|
|
#1 |
|
how to rename multiple files on the Mac
I am in an online class and need to send a folder with 10 files to the teacher. The pc uses can use F2 and it will rename all the files with the one name of the folder. Does anyone know how to do this on the Mac Ibook?
|
|
|
|
0
|
|
|
#2 |
|
if u are talking about windows "F2" for renaming, the same way u can accomplish the task on Mac is to right click (or ctrl+click) and select "Get Info" from the popup. In that u can rename the folder name.
2nd method: Use "terminal" or "console" and go to that place of folder. use "mv (actual_name) (final_name)" Has my answer solved ur problem? |
|
|
|
0
|
|
|
#3 |
|
Automator should do the trick for batch changes like that.
__________________
|
|
|
|
0
|
|
|
#4 |
|
google "renamer4mac"
|
|
|
|
0
|
|
|
#5 | |
|
Quote:
It's trivral in the terminal to change file names. The command of "mv" (just two leters) if you want to apply the mv command to multiple files then you might use mv in conjucion with "find" where you tell find which files need to be mv'd. |
||
|
|
0
|
|
|
#6 |
|
TotalCommander or Terminal
The question is wrong; if you press F2 on a PC when selecting 10 files, the last filename of the selection will open, and there is no way you can automatically retrieve the name of the folder to add as a prefix or suffix to all 10 files.
You can quickly do this using terminal as suggested by a previous post, but I would add that you can do multiple entries at the same time. Using TextWrangler (free) column mode, it's easy to create a bash shell script this way. As you may know, the terminal allows easy copy-paste on a Mac. If you're not script-oriented, you can use DiskOrder3 or TotalCommander. You can use TotalCommander on your Mac if you have VMware Fusion 3 in "unity" mode. So you run it as any Mac app. Hope this helps |
|
|
|
0
|
|
|
#7 |
|
+1. Automator is very easy to use, and will let you do batch changes to filenames. Look for the right workflow (should be something like "Rename finder items") under the "Finder" column in Automator. I'm not in front of my Mac right now, but it should be clear and easy to find.
Drag the items you want to rename into the workflow pane in Automator. Then drag the Rename workflow script under that. Enter the filename you want to use and select the options (serial naming, etc.) Start the workflow and it will be done in a heartbeat. |
|
|
|
0
|
|
|
#8 |
|
You can also use the terminal to rename files.
This is just a quick example of one use and hopefully with google or macrumors forums you can tailor it to your use.
Let's say you have 5 files. file1 file2 file3 file4 file5 You want to add the .txt extension to the file. Open an editor and enter the following in a file named script: #!/bin/bash for i in file* do mv $i $i.txt #The mv command means move. Use cp to copy. done Then make the script executable. $chmod +x script Then launch it ./script |
|
|
|
0
|
|
|
#9 |
|
This YouTube video explains it all :)
This video shows you how to batch rename using Automator
http://www.youtube.com/watch?v=Y6eLxNxzgqQ |
|
|
|
1
|
|
|
#11 |
|
liked the script.
tried to modify it to remove the .txt extension of ALL files in a directory and make copies these files are named 1.txt , 2.txt , etc like so #!/bin/bash for i in * do cp $i.txt $i #The mv command means move. Use cp to copy. done got a LOT of errors for example cp: 990.txt.txt: No such file or directory help? |
|
|
|
0
|
|
|
#12 | |
|
Quote:
You need to remove the trailing .txt from $i. The ${var%suffix} syntax will expand by removing suffix from variable var. Try using this cp command in your script. Code:
cp $i ${i%.txt}
|
||
|
|
0
|
|
|
#13 |
|
The best way to batch rename, IMO, is to drop the attached perl script in your bin and use regex. E.g.
PHP Code:
|
|
|
|
0
|
|
|
#14 |
|
tnx jiminaus and sero.
preciate ur help |
|
|
|
0
|
|
|
#15 | |
|
Quote:
Thanks again! |
||
|
|
0
|
|
|
#16 |
|
My problem!!!
I am new here so I don't know if I am supposed to start a new post..
My problem is as follows - My technical department generates an excel report every other day. Their system is automated so the file name is very long and goes like this Multiproduct Technical Report for 2011 12 06 by Jones.xls. I have hundreds of reports like this. Is there a way where I can change the names of all the files to say MTP 2011 xx xx.xls? Basically I want to preserve the unique date, remove "by XYZ" and modify (shorten) the "Multiproduct Technical Report" to something like "MTP"? Thank you for your help. sm |
|
|
|
0
|
|
|
#17 |
|
I just thought I'd mention the (perhaps) obvious, that simple file renaming is available by putting Applescript in the menu bar via the Applescript Editor ( Utilities) preferences.
Then, having selected your files to rename, select it in the menubar, choose Finder Scripts and there are options to Add (to) and Trim (from) file names. Not hugely sophisticated but it's done the job for me in the past. It nearly does the job that sm789 wants to do ( assuming multiple passes ) but I suspect there's an issue with the 'by Jones' bit because it won't always be Jones. |
|
|
|
0
|
|
|
#18 | |
|
Quote:
"Multiproduct Technical Report for ${date} by ${name}.xls" Here's one approach with bash. Code:
#!/bin/bash
#
# Check for arguments
if [ $# -ne 1 ]
then
echo "Arguments: <file to be renamed>"
exit 1
fi
# Make sure that the file name is of the form: ""Multiproduct Technical Report for ${date} by ${name}.xls"
test=$(echo "$1" | grep -P "^Multiproduct Technical Report for \d{4}\s\d{2}\s\d{2} by \w+\.xls$")
if [ -n "$test" ]
then
date=$(echo "$1" | cut -d" " -f5-7)
echo "MTP ${date}.xls"
#mv "$1" "MTP ${date}.xls"
fi
|
||
|
|
0
|
|
|
#19 |
|
Interesting thread! Do you know how to rename files in multiple folders recursively where the renaming should be an added prefix that has been taken from the folder name?
For example, to set the date as the prefix on each photo file in each date folder in the following folder structure? 2012-01-01 (Folder contains jpg photo files taken on the 1st of Jan 2012) 2012-02-28 (Folder contains jpg photo files taken on the 28th of Feb 2012) 2012-03-15 (Folder contains jpg photo files taken on the 15th of Mar 2012) ... It would be even more fantastic if it was possible to shorten the inserted date prefix to just "YYMMDD_" instead of insert the original full date and the dashes "YYYY-MM-DD_". The original file name is "DSCF12345.jpg" The renamed file name should be: "120101_DSCF12345.jpg" Last edited by MattiasN; May 27, 2012 at 08:47 AM. Reason: minor text corrections |
|
|
|
0
|
|
|
#20 |
|
Cant believe why apple make it so complicated for some frequently use functions!!!! It sounds like we are going back to the apple 2 age... need to memorize all the commands!!!
Do they have any idea there is a big room for them to improve and make it really USER FRIENDLY!!!???? ![]() really makes me sick!!! |
|
|
|
0
|
|
|
#21 | |
|
Quote:
|
||
|
|
0
|
|
|
#22 |
|
And if you start the terminal window, there are lots and lots of variations on how to do the renaming. Lurking in there is a full Unix system, with all of the commands either already installed or easily downloadable.
Learning to use the shell commands or perl or similar programming languages will take a bit of effort but can be very worthwhile. There are of course graphical programs doing some of these things, but if your exact requirement is not handled you are generally off on your own. Then shell is your friend. //Gunnar |
|
|
|
0
|
|
|
#23 |
|
Hello!
![]() I think I'm having the same problem of Darice Terry, but I'm guessing, since he's never replied again to his own thread. Just today I was looking for a friendly way to rename multiple files with the same name (different extensions of course!) on Mac OS X Lion, but I haven't found any yet. Let me explain. With Windows 7, in order to rename two files at once, for example an AVI file with a Subtitles file: file1.avi file2.srt I can select them both, press F2 (or Right click > Rename), and type the new name once. The result will be: new_name.avi new_name.srt With OS X, I have to click on the first file and type the new name, then click on the second file and do the same. Is there an easier way, not involving scripting? I can't believe that Windows can be more user friendly than OS X ![]() Thanks! Last edited by OlandeseVolante; Mar 19, 2013 at 06:18 PM. |
|
|
|
0
|
|
|
#24 | |
|
Quote:
Terminal, man mv |
||
|
|
0
|
|
|
#25 |
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| How to watch Xvid files on a Mac? | riker1384 | Digital Video | 25 | Jun 10, 2012 03:08 PM |
| How To Locate Multiple Files at the Same Time | NYDF | Mac OS X | 3 | Feb 21, 2010 07:56 PM |
| How to prevent hidden files on the network | justinm | Mac OS X | 0 | Jun 22, 2009 03:19 PM |
| How to unzip rar files on the mac? | jibeman | iMac | 5 | Mar 25, 2008 01:12 AM |
| How to view .pps files on a Mac? | Caezar | Mac Applications and Mac App Store | 4 | Dec 19, 2006 04:15 PM |
All times are GMT -5. The time now is 01:22 AM.











Linear Mode

