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

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

@Feanux I was answering your question and then you deleted it but I see you reposted it, anyway I have made a Automator app that does this and will attach a screenshot (that was taken by Automator). As you can see it takes two screenshots, one for clipboard and one for preview/save UPDATE:


1

What's the fully qualified pathname of the executable? If it's not within in the $PATH that's passed to the do shell script command, which is /usr/bin:/bin:/usr/sbin:/sbin, then you'll need to use the fully qualified pathname of the executable. To make an executable available globally, it must be in a directory that's included in the $PATH. You can also ...


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