Question Locked

Batch file for adding string to filename

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Ill get straight into it, I have a file name that get written out every night in the form of
filename April 16, 2012.log

Now i need to rename it to filename April 16, 2012_edit.log daily.
Which is proving to be rather difficult as it appends the _edit after the extention when I run it.

Any help please...

8 replies

by slayer_

Is using a VBScript or shelling to another program out of the question?

by cd

ren *.log *._edit.log

by dmritchie2

@echo off
copy *.log *.
erase *.log
ren *. *_Edit.log

This discussion is closed to new replies.