Moving items in the Finder
The Finder's Standard Suite includes the Move command, which lets you change the location of a file or folder in the Finder. The following script moves a file from one folder to another. Replacing an existing item If the location to which you are moving the item already has a file or folder with the same name, the Finder returns an error. If you are sure you want to replace the existing item with the one you are moving, you can use the Replacing parameter to do so, as in the next example: Using the reference As with other Finder commands, the Move command returns a reference to the new location of the item being moved. You can use the Reveal command to show the file after moving it: Moving an item to another disk If you move a file to a disk other than the one it is on, the original file is not deleted. In this case, the Move command works like the Duplicate command. If you want to move a file to another disk and delete the original, the script must delete the original file, as in the next example: Related topic
|
Table of contents |