Computing.Net > Forums > Windows XP > rename batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

rename batch file

Reply to Message Icon

Name: ging
Date: July 31, 2008 at 12:35:14 Pacific
OS: xp
CPU/Ram: 1000
Comment:

I have tons of excel files to rename. All excel files doesn't have a regular naming conversion. for example there are asbd.xls fdsfdh.xls

I need to change all 3000 files to something in order like 1.xls, 2.xls and up to 3000.xls

Is there a batch files that can do that?

Thx in adavnace.




Sponsored Link
Ads by Google

Response Number 1
Name: jefro
Date: July 31, 2008 at 15:55:56 Pacific
Reply:

There are tons of ways. I do simple ways like put all the file names into a text file then use that test file to serve as input to the next rename command.

"Best Practices", Event viewer, host file, perfmon, are in my top 10


0

Response Number 2
Name: Mechanix2Go
Date: July 31, 2008 at 18:22:19 Pacific
Reply:

@echo off
setLocal EnableDelayedExpansion

for /f "tokens=* delims= " %%a in ('dir/b/a-d *.XLS') do (
set /a N+=1
ren %%a !N!.XLS
)


=====================================
If at first you don't succeed, you're about average.

M2


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: rename batch file

Batch file renaming question www.computing.net/answers/windows-xp/batch-file-renaming-question/111359.html

Batch File to search, copy , rename www.computing.net/answers/windows-xp/batch-file-to-search-copy-rename/154130.html

Dos batch file rename: question. www.computing.net/answers/windows-xp/dos-batch-file-rename-question/135964.html