help renaming files
hey i was hoping someone here could help me. i need to rename all files in a directory that contain a ? symbol to be renamed to add a .txt extension on the end (doesnt have to replace the current one), if anyone can help me by telling me what command to use i would be very happy :)
|
Code:
find ./ -maxdepth 1 -iname "*\?*" -exec rename {} {}.txt {} \; |
Code:
find ./ -maxdepth 1 -iname "*\?*" -exec rename {} {}.torrent {} \; find: rename: No such file or directory find: rename: No such file or directory find: rename: No such file or directory find: rename: No such file or directory rename doesnt work :( is there a way to do it using the mv command or something? |
Code:
for name in `ls|grep ?`; do mv $name $name.txt; done |
Works, thanks so much and sorry about the double post before :)
|
All times are GMT -5. The time now is 07:06 AM. |