SnideRemarks Posted March 26, 2015 Share Posted March 26, 2015 I'm brand new to Alfred. Here is my task. I need to rename over 5000 files (phone prompts). I have the files in sequential order in a folder. The list of unique names is in a spreadsheet column. Can a workflow be written to select the top name in the spreadsheet, copy, select the top file in the finder window, paste, go back to spreadsheet and select next name, copy, select next file in finder window, paste, etc.? If Alfred can't do it, do you have a suggestion for what can? Link to comment
vitor Posted March 26, 2015 Share Posted March 26, 2015 Is this a task you’ll perform once, or something you’ll need repeatedly? If the former, Alfred isn’t your best bet, but instead a shell script. If that’s the case, could you make the spreadsheet available as a .csv file? Link to comment
SnideRemarks Posted March 27, 2015 Author Share Posted March 27, 2015 Thanks for your reply. I am producing files in sessions for different departments. Yes I can make a cvs file of each list of file names. The first list has 577 file names. I will have to do this for several groups. I'm not a programmer and don't know how to write shell scripts. Link to comment
vitor Posted March 29, 2015 Share Posted March 29, 2015 I'm not a programmer and don't know how to write shell scripts. Yes, I was expecting as much. I meant that just as a small hint that the problem wasn’t being approached the best way, as Alfred would be way too complex for this, if it’s something needed only once. I’m offering to help with the script. Could you please export one of those as .csv and make it available for download? You can alter characters and words to make the data fake: the thing I need is to understand its structure (how many columns on the spreadsheet, if numbers are separated from words, what’s the column to target, if there are commas in the date itself). Link to comment
SnideRemarks Posted March 30, 2015 Author Share Posted March 30, 2015 Thanks, Vitor¡ You can download a csv file from http://66.49.7.70/vitor There is only one column. The file names start with cell A3. Thanks again, Clyde Link to comment
vitor Posted March 30, 2015 Share Posted March 30, 2015 That looks like it’s a binary file. Link to comment
SnideRemarks Posted March 31, 2015 Author Share Posted March 31, 2015 The original was an .xlsx file that I opened with Open Office. I then saved it as a .csv file and removed all data except column A. Should I give you a copy of the .xisx file and let you convert it to what you need? Link to comment
vitor Posted March 31, 2015 Share Posted March 31, 2015 A .csv is what I need. You should be the one to create it, to make sure they’ll always be made the same way. What I’m saying is the file you link to appears to not be a .csv, but a binary instead. I then saved it as a .csv file and removed all data except column A. You can change the data, but don’t remove anything or else the structure will be different. I need something close to the files you’ll be working on, to make it work. Link to comment
SnideRemarks Posted March 31, 2015 Author Share Posted March 31, 2015 Okay, I have posted a copy of the exact file I want to work with. It is an .ods file (Open Office). Same link as above. Link to comment
SnideRemarks Posted March 31, 2015 Author Share Posted March 31, 2015 I have now posted a version of the full spreadsheet which was created by Open Office as a .csv file. I made sure it is comma delimited. It's titled BCBSKS-Member_Full Link to comment
vitor Posted March 31, 2015 Share Posted March 31, 2015 There you go, and a video on how to use it.I ended up using the simplest .csv (the other one was displaying weirdly). To format them correctly, delete everything that isn’t a name (including the FILE NAME line you had). If the number of lines in the .csv and the number of files in the directory differ, it’ll throw an error and stop. You should also know the Finder and terminal are different regarding alphabetical order; while the Finder shows 1 2 3 4 5 6 7 8 9 10 11 the terminal shows 1 10 11 2 3 4 5 6 7 8 9 so keep that in mind if your files are sequential. Link to comment
SnideRemarks Posted March 31, 2015 Author Share Posted March 31, 2015 Vitor, Thanks for your efforts. When I drop the script onto Terminal I get a message telling me it won't open because I don't have appropriate access privileges. However, my Get Info box tell me I have "read and write" privileges. What's with that. Link to comment
vitor Posted March 31, 2015 Share Posted March 31, 2015 You don’t need to drop it on the terminal; double-clicking should be fine. As for permissions, type in a terminal chmod +x (notice there’s a space at the end, so it should be something like chmod +x /path/to/renamer.command) and press ↩. That’ll give execute permissions. Link to comment
SnideRemarks Posted April 3, 2015 Author Share Posted April 3, 2015 IT WORKS!!! Thanks very much, Vitor. Link to comment
Recommended Posts