Forums Cache
Copyright MonkeyJob Systems 2005
All rights reserved

Home FAQ Current Forums Contact
 Search For Data
   

Zero padding numeric filenames

Related Topics:
Sequencing File Names


Author Message
cchivers I'm trying to zero pad numeric filenames that are currently numbered

1.eml
2.eml...
9999.eml

I need
0001.eml
0002.eml...
9999.eml


As they are right now, they will not sort properly in many applications, and I need them to sort from 0001 - 9999.

I can't find a way in FileMonkey to prepend zeroes to my existing filename, based on a target length of 4 digits. Any suggestions?

Thanks!
monkeyjob
Site Admin
Hi,
please use the following instructions:

1. Right click on the FileMonkey icon and select "Run as administrator".

2. Use the folder tree in the main window to find the folder that your files are in.

3. We assume that all target files are in the same folder. Clear the "Include sub folders" tick box.

4. Right-click on the file list and select "Target all files" from the pop-up menu.

5. Your files should now be displayed in the main window.

6. Make sure that the files are sorted in numerical order. For example:

1.eml
2.eml
3.eml

...


10.eml
11.eml


...


9999.eml

If the files are not sorted in this order, right-click on the file list and select the "Sort By Column/File Name" menu item.

7. Select the "Quick-Find/Rename" menu item from the main window.

8. In the rename window, select the "Rename Files" option.

9. Clear the "Start text" tick box.

10. Tick the "Add sequence" tick box. Enter an align zero's value of 4 and a start at value of 1.

11. Tick the "End Text" tick box and enter the text ".eml"

12. Tick on the "Start" button to start the operation.

Regards,
monkeyjob.
cchivers Oh, of COURSE!!! I can just rename them, since they're in numerical order in Explorer. I was expecting them to be ordered thusly:

1.eml
10.eml
100.eml
101.eml
102.eml
103.eml
104.eml
105.eml
106.eml
107.eml
108.eml
109.eml
11.eml
110.eml...

Sorting by column took care of it. Thanks for making File Monkey as smart as it is!

BTW, the entire body of email is over 517,000 messages. The mail is broken down into many layers of subfolders. Thanks to the "Restart Sequence for each folder" switch, FileMonkey was able to properly number the whole collection.

Sincerely,
Carl
cchivers
I have just discovered why I in fact need to prepend zeroes to the existing numeric filenames:

The filenames are not continuously, sequentially numbered (certain files have been withheld due to legal privilege). The filenames are critical and must be preserved to order the files properly, but can be zero padded.

Therefore, sequential renumbering is NOT an option, and we need to find another solution. Any ideas?

Thanks!
monkeyjob
Site Admin
Hi,
so are you saying that you still need the files to be zero padded but from the files that you have, some of them are missing. For example, instead of having files:

1.eml
2.eml
3.eml
4.eml
5.eml
6.eml
7.eml
8.eml
9.eml
10.eml

You infact have files like:

1.eml
2.eml
3.eml
4.eml
6.eml
7.eml
9.eml
10.eml

Regards,
monkeyjob.
cchivers
Correct, the files are missing some sequential numbers.
monkeyjob
Site Admin
Hi,
yes, you can do this, but the process is a bit more tricky.

Please use the following instructions:

1. Right click on the FileMonkey icon and select "Run as administrator".

2. Use the folder tree in the main window to find the folder that your files are in.

3. Right-click on the file list and select "Target all files" from the pop-up menu.

4. Your files should now be displayed in the main window.

5. Click on the "Use filters" arrow at the bottom of the main window.

6. Clear ALL tick boxes.

7. Tick the "File pattern" tick box.

8. Enter a file pattern of "?.eml"

This will target files 1.eml through to 9.eml

9. Select the "Quick-Find/Rename" menu item.

10. In the rename window, select the "Rename Files" option.

11. Clear ALL tick boxes in the rename window.

12. Tick the "Start Text" tick box and enter the following text:

"000<oldFileNameNoExt>.eml"

13. Click the "Start" button to start the operation

14. When the operation is complete, close the results window and close the rename window.

15. In the main window, enter a file pattern of "??.eml"

This will target files 10.eml through to 99.eml

16. Select the "Quick-Find/Rename" menu item.

17. In the rename window, select the "Rename Files" option.

18. Clear ALL tick boxes in the rename window.

19. Tick the "Start Text" tick box and enter the following text:

"00<oldFileNameNoExt>.eml"

20. Click the "Start" button to start the operation

21. When the operation is complete, close the results window and close the rename window.

22. In the main window, enter a file pattern of "???.eml"

This will target files 100.eml through to 999.eml

23. Select the "Quick-Find/Rename" menu item.

24. In the rename window, select the "Rename Files" option.

25. Clear ALL tick boxes in the rename window.

26. Tick the "Start Text" tick box and enter the following text:

"0<oldFileNameNoExt>.eml"

27. Click the "Start" button to start the operation

Regards,
monkeyjob.
cchivers
Thanks guys, that makes sense. I wish this were as easy as sequential renumbering, but it isn't. I'll go forward with the renumbering using the "?" wildcard.

Thanks for all your excellent assistance!!



  | About Us | Privacy | Terms | Affiliates | Partners | Copyright ©2003 MonkeyJob Systems All Rights Reserved |