![]() (When you copy and paste, make sure that the first line, beginning “if” and ending “then”, and the sixth, beginning “do” and ending “as string” are each a single line, with no hard returns in the middle.) Just save the workflow as Finder > Toggle Hidden Files. ![]() Add the Run AppleScript action to your workflow, and enter the following: if contains (do shell script "defaults read AppleShowAllFiles") then set theValue to "TRUE"else set theValue to "FALSE"end ifdo shell script ("defaults write AppleShowAllFiles " & theValue) as stringdo shell script "killall Finder" Actually, this AppleScript really just triggers a bunch of Unix commands to update the Finder’s preferences to show hidden files and then relaunch the Finder. Automator doesn’t have an action for toggling on and off the visibility of hidden files, so again you’ll need to use AppleScript to do it. Start by creating a new Automator Application workflow. Sometimes it helps to see hidden system files this one toggles their visibility on and off. Select a file or folder, then select the service, and the date will be prepended. ![]() Your workflow now shows up in the Finder’s Services menu when you Control- or right-click on something. Lastly, save the workflow as Files and Folder > Add Date Prefix. While all of this sounds kind of complicated, it’s really just telling Automator you want the date prefix in YYYY-MM-DD format. ![]() Then set the Date/Time popup to Current, the Format popup to Year Month Day, the Where popup to Before name, the first Separator popup to Dash, the second Separator popup to Space, and click the Use Leading Zeros checkbox. If Automator prompts you to insert a Copy Finder Items action first to preserve your originals, click Don’t Add you’re just adding a prefix to the names of the files, not deleting them or anything serious like that.Ĭonfigure the action to Add Date or Time. Find the Rename Finder Items action and drag it to the workflow. This one adds a current date prefix to the names of any selected files or folders.Ĭreate a new Automator Service workflow and set it to process files or folders in Finder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |