how to rename files?


CyberMew

Recommended Posts

I searched online, and i type this:

rename -v .srt .en.srt **/*.srt

 

I was trying to rename .srt to .en.srt, but now i realise that the folders below is not affected

 

/shows/showA/filenameE01.srt

/shows/showA/somefolder/filenameE02.srt

/shows/showB etc lots of folders

 

after execution the above rename command at "shows" level, it becomes becomes:

 

/shows/showA/filenameE01.en.srt

/shows/showA/somefolder/filenameE02.srt (this remains unaffected)

/shows/showB etc lots of folders

 

any idea how I can fix this? i cannot use the same command again because the current .en.srt files will become .en.en.srt

 

Link to comment

That seems good, but do they have a version that unraid can run on? My network is slow so I have to access the files directly on the server, and it's much faster too.. Besides I have some smb permissions that doesn't allow some of my folders to be directly accessible outside

 

 

edit:

the -R didn't work, I ended up doing this instead

 

find . -type f -name "*.srt" -exec rename .srt .en.srt {} \;

Link to comment
  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.