Computing.Net > Forums > Disk Operating System > rename file w/part of original 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 file w/part of original file

Reply to Message Icon

Name: IndyB
Date: August 21, 2003 at 12:01:57 Pacific
OS: Win2k
CPU/Ram: intel 512
Comment:

Is there a way to rename a file with part of the original file name?

Original file name is ex082203.log
Can I rename it to p1082203.log where the 082203 would be different for each file, and the ex would be standard for each file.

So basically I'd need to replace the ex with the p1

And this would need to be done automatically to every file in the a directory.



Sponsored Link
Ads by Google

Response Number 1
Name: Marooma
Date: August 21, 2003 at 18:55:57 Pacific
Reply:

Try this:

REN ex??????.log p1??????.log


0

Response Number 2
Name: Adrian S
Date: August 22, 2003 at 04:12:52 Pacific
Reply:

or
ren ex*.* p1*.*


0

Response Number 3
Name: Brian HANLON
Date: August 23, 2003 at 10:03:19 Pacific
Reply:

Have a look at:
LMOD
Versatile line/list modification tool to generate lists of commands, set variables to anything extracted from (DOS) output, and more.. Win NT/2000 compatible.
DEC 2002

At URL: http://home.mnet-online.de/horst.muc/

This gem will enable you to take a
Dir *.* /b>dlist.txt
type of list, and pipe it through LMOD to produce a BATchfile which could rename with all sorts of parsing possible. It enables some very fancy dynamic creation of BATchfiles.

Baldy.


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


Sponsored links

Ads by Google


Results for: rename file w/part of original file

Search/Replace in modified boot disk www.computing.net/answers/dos/searchreplace-in-modified-boot-disk/3006.html

DOS Scripting / Rename files www.computing.net/answers/dos/dos-scripting-rename-files/12240.html

Renaming files in DOS www.computing.net/answers/dos/renaming-files-in-dos/12862.html