Computing.Net > Forums > Disk Operating System > creating a batch file to rename fil

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.

creating a batch file to rename fil

Reply to Message Icon

Name: corrington_j
Date: August 20, 2004 at 16:08:05 Pacific
OS: win xp pro
CPU/Ram: 900 mhz
Comment:

I am wondering if it is possible to create a batch file that could search a directory for all occurences of some string in file names and then replace that with a new string.

example
name_1.txt
name_2.txt
name_3.txt

i would like to be able to search for files with name in them, and replace name with something else.




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: August 21, 2004 at 04:16:44 Pacific
Reply:

if exist name_1.txt ren name_1.txt new_1.txt

You can guess the rest.


0
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 Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: creating a batch file to rename fil

a batch file to rename certain files www.computing.net/answers/dos/a-batch-file-to-rename-certain-files/10372.html

Creating a batch file to append to a text file www.computing.net/answers/dos/creating-a-batch-file-to-append-to-a-text-file/3180.html

Using a batch file to name a file with the system date. www.computing.net/answers/dos/using-a-batch-file-to-name-a-file-with-the-system-date/3481.html