I got like, some 1000 files I need to rename, because they are too long. I was hoping there is a program I could find that:
Checks to see if the file name goes over a certian limit.
If so, then it deletes/renames those over the limit
Can anyone direct met to something like this? Thanks.
ID:187214
![]() Jan 21 2005, 4:40 am
|
|
![]() Jan 21 2005, 4:43 am
|
|
i know there are such programs for linux, so i'm betting there are 'mass renaming' programs for Windows too. google is your friend!
|
You can do this with the rename command in the Windows command prompt. Just open up the command prompt and run "rename /?" to see how to use it. Also, you can use ? (a single character) and * (multiple characters) as wildcards.
If I had these files in a folder: blah.txt asdf.avi game.dmb And I navigated to the folder in the command prompt and ran "rename ??*.* ??.*", then the files would become: bl.txt as.avi ga.dmb You could probably use this same format, just put as many ?'s as you want to tell how long the file name will be. For example, five characters would be "rename ?????*.* ?????.*". Hope this helps. =) |
Shades wrote:
I got like, some 1000 files I need to rename, because they are too long. I was hoping there is a program I could find that: Download Total Commander (http://www.ghisler.com), it has excellent search functions with regexp tools that you can use. /Gazoot |
If you're not familiar with regexps, this is how to do it in Total Commander:
Go to the directory you want to search, press Alt+F7. Enter ".{X,}" in the Search file(s) box, where X is the minimum file name size you want to find. Check the RegEx button, then search. When results are displayed, click "show list in panel" (bottom right button). Select all those files (Ctrl+A) and press delete. Voila! /Gazoot |