Search found 2 matches

by cpatin
13 Aug 2013 22:38
Forum: DOS Batch Forum
Topic: File rename batch
Replies: 2
Views: 1509

Re: File rename batch

Typo in below, should be

cd documents
set /a $_count=1
for %%i in (*) do (rename %%i file%$_count%.txt & set /a $_count=$_count+1)
by cpatin
13 Aug 2013 22:14
Forum: DOS Batch Forum
Topic: File rename batch
Replies: 2
Views: 1509

File rename batch

I'm trying to create a batch in which I rename all the files in one directory so that they have identical names except for the last character. For example, after it is processed I'd like to see file1.txt file2.txt file3.txt ... etc. I'm trying to use a variable that gets incremented for each iterati...