Hot answers tagged

7

export into a CSV: two columns, separated by ; (assuming there is no ; in a file name) open Terminal change to folder containing the files run perl -pi -e 's/\r\n/\n/;' LISTOFNAMES.csv to fix CRLF issues run while IFS=\; read old new; do mv "$old" "$new"; done < LISTOFNAMES.csv PS: This will overwrite existing files if the new name already exists. ...


4

on run {input, parameters} is AppleScript syntax, not a valid shell command. If you want to execute AppleScript in the service, use the Run AppleScript action instead of Run Shell Script.


3

This AppleScript ask you to choose some files, after that, it set the comment of each file to the file name. set input to choose file with prompt "Select files (to put the file name into the Spotlight Comment)" with multiple selections allowed tell application "Finder" repeat with i in input tell item i to try set tName to (get name) ...


3

I've found this to be one of the most simple ways: In a spreadsheet column, concatenate: "cp oldfilename newfilename" to create a copy with the new name. Use "mv oldfilename newfilename" to replace the old files rather than copy. Copy this concatenated column to a text file and save as rename.sh in the folder with the files to be renamed. Open terminal, ...


2

Automator uses the path variable hard coded in the kernel. sysctl user.cs_path user.cs_path = /usr/bin:/bin:/usr/sbin:/sbin Actually, this is the path set for a user's launchd and is then inherited by Automator when you launch the application. launchctl getenv PATH /usr/bin:/bin:/usr/sbin:/sbin Use the absolute paths to your executables or modify the ...


2

You can do this with an AppleScript. Use the Script Editor in the Utilities folder. Here is a script I wrote for you just now. It works on one folder at a time-- not the top level folder, but the one in your example that is 3587915. When you run this script it asks you to choose a folder. In this example you would open 3587915 and then click "Choose." Very ...


1

A couple years back I wrote a blog post on performing bulk file operations. The first step was to copy the list of files from search results into a spreadsheet. Since you already have the spreadsheet, you are very close to having a script that can do the renaming for you. Let’s assume you have old names in column A and new names in column B. Write the ...


1

You can use a "Run Shell Script" action and sips to downscale your pictures to any value. Add a "Run Shell Script" action, make sure the input method is set to "stdin" (should be the default) and insert the following script SCALEFACTOR=500 while IFS= read file; do sips --resampleWidth $(($(sips -g pixelWidth "$file" | ...



Only top voted, non community-wiki answers of a minimum length are eligible