User Tools

Site Tools


action:File_Actions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
action:File_Actions [2021/10/12 00:32]
peternlewis
action:File_Actions [2024/11/10 01:42] (current)
peternlewis [How To Use]
Line 5: Line 5:
   * Reveal in Finder   * Reveal in Finder
   * Create Unique File (v10.0+)   * Create Unique File (v10.0+)
-  * Move (and/​or ​Rename)+  * Move (v11.0+) 
 +  * Rename ​(v11.0+) 
 +  * Move or Rename
   * Copy   * Copy
   * Duplicate   * Duplicate
Line 12: Line 14:
   * Delete Directory (permanently)   * Delete Directory (permanently)
  
-{{move-rename-action.png?​nolink|}} +Delete is obviously dangerous, and Delete Directory is extremely dangerous. Ensure you have full system backups before using this action.
- +
-Delete ​File is obviously dangerous, and Delete Directory is extremely dangerous. Ensure you have full system backups before using this action.+
  
 ===== How To Use ===== ===== How To Use =====
  
-You can either insert ​the main Action (shown above), and then choose the actual ​action to use in the dropdown, OR, insert one of the preconfigured Actions from the Action panel/​menu:​ +Select ​the action ​you wish to perform.
- +
-{{:​action:​file-actions-km8.png?​nolink|}}+
  
 Click the File Chooser button on the right of an action to select an existing file or folder on disk. Option-click on the File Chooser button to show the currently selected file or folder in the Finder (assuming it exists already). Click the File Chooser button on the right of an action to select an existing file or folder on disk. Option-click on the File Chooser button to show the currently selected file or folder in the Finder (assuming it exists already).
Line 27: Line 25:
  
 ^ Option ^ Description ^ ^ Option ^ Description ^
 +^ Reveal | brings the Finder to the front with the file or folder selected. |
 +^ Create Unique File (v10.0+) | create a new unique file based on the path you supply, adjusting the base name to something unique, and returning the new file path in the specified variable. |
 +^ Move (v11.0+) | moves a file or folder. |
 +^ Rename (v11.0+) | renames a file or folder. |
 +^ Move or Rename | moves and/or renames a file or folder. |
 ^ Copy | copies a file or folder. You must specify a name and location for the copy.\\ Since this requires a destination for the copy, if you want to just copy the file to the Clipboard, see [MACRO: ​  ​Choose File and Copy It [Example]](https://​forum.keyboardmaestro.com/​t/​choose-file-and-copy-it-example-macro-v9-0-2/​15581) | ^ Copy | copies a file or folder. You must specify a name and location for the copy.\\ Since this requires a destination for the copy, if you want to just copy the file to the Clipboard, see [MACRO: ​  ​Choose File and Copy It [Example]](https://​forum.keyboardmaestro.com/​t/​choose-file-and-copy-it-example-macro-v9-0-2/​15581) |
-^ Delete | deletes a file (but not a folder) with no warnings or confirmation messages. The file is deleted and not moved to the Trash. Be careful with this action. | 
 ^ Duplicate | duplicates a file within the same folder and adds // copy// to the filename. | ^ Duplicate | duplicates a file within the same folder and adds // copy// to the filename. |
-Move | moves and/or renames ​a file or folder. | +Trash | moves a file or folder to the Trash (on remote volumes, the system may immediately delete ​the file
-^ Reveal | brings the Finder ​to the front with the file or folder selected. ​+Delete File deletes ​a file (but not a folder) with no warnings ​or confirmation messages. The file is deleted and not moved to the Trash. Be careful with this action. |
-Trash moves a file or folder ​to the Trash from where it can easily be recovered. |+
 ^ Delete Directory | Be **extremely careful** with this action as it deletes the folder and all its contents with no warnings or confirmation messages. | ^ Delete Directory | Be **extremely careful** with this action as it deletes the folder and all its contents with no warnings or confirmation messages. |
  
 ==== Move and/or Rename ==== ==== Move and/or Rename ====
  
-{{:​action:​move_finder_item_action_-_km8.png?​nolink|}}+The option _Move_or_Rename_ allows you to do three different things, based on the data you supply in the _to_ field. ​ In all cases, the _Source Item Path_ field must be the _full path_ to the source Finder item (file or folder) that is being acted upon. 
 + 
 +If you specify a folder in the _to_ field (eg `~/​Documents/​SomeFolder`),​ the file will be moved to the specified folder.
  
-This Action Option can be confusing because although the Option popup shows only _Move_, it in fact **allows ​you to do three different things, based solely on the data you supply in the _to_ field**. ​ In all cases, the _Source Item Path_ field must be the _full path_ to the source Finder item (file or folderthat is being acted upon To add further confusion, the Action Title remains constant at "Move or Rename"​ regardless of the actual operation to be performed.+If you specify a file name (without any slash `/`(eg `NewName.jpg`)then the file will be renamed.
  
-=== Operations Available ===+If you specify a full path to a new location with a new name (optionally the same name) (eg `~/​Documents/​SomeFolder/​SomeName.jpg`),​ then the file will be moved and renamed.
  
 +The _Move_ option requires the _to_ field to specify an existing folder and moves the specified source file or folder to the new location.
  
-^ Operation ^ Description ^ To Field ^ Example ^ +The _Rename_ option requites ​the _to_ field to specify only file name (without ​any slash `/`and renames ​the file or folder without moving it.
-^ Move _Only_ | Moves the Item to a Different Folder, and keeps the same Item Name | Full Path to the existing Destination _Folder_ | ~/​Documents/​SomeFolder | +
-^ Rename _only_ | Renames the Item, which stays in its original Folder | Can be either just the _new_ Item Name (including extension, if any)\\ OR Can be the full path to the item with its _new_ name. | Some New File Name.txt | +
-^ Move _and_ Rename | Moves the Item to a Different Folder with a _new_ name | Must be the _Full Path_ to the Item,  with its _new_ Item name and existing Destination Folder. | ~/​Documents/​SomeFolder/​Some New File Name.txt |+
  
 === Overwrite Existing File(s) === === Overwrite Existing File(s) ===
action/File_Actions.1634013162.txt.gz · Last modified: 2021/10/12 00:32 by peternlewis