[SOLVED] Terminal sequential batch rename

I am trying to rename some files that are named randomly into something that is more uniform, such as ‘txt00000001.txt’ to ‘txt13573578.txt’.
I want to try this using terminal and not a GUI file renamer.

You could take a look at some of the examples here:

Which also explain how the examples work.

I also wanted to create sequentially named folders such as ‘jpg 00001’ to ‘jpg 54500’ but found I can’t use a space in the filename.

I have figured a workaround with this, name them ‘jpg_00001’ and so on and then use Pyrenamer to remove the spaces.

To put a space in a filename using the terminal you need to use a backslash.

For example to create the file ‘jpg 00001’ enter this; (I’ve taken the presumption the original file is jpg00001 for demonstration purposes. Replace that with the actual file name.)

mv jpg00001 jpg\ 00001

Hope this is of some help to you. I’m pretty sure you could modify the script to reflect this.