Page 1 of 1

take input and append to file name

Posted: 14 Sep 2009 12:31
by bt
If I want to ask the user for input and append it to the file name, how do I do that given:

Code: Select all

set INPUT
set /P INPUT=Revision of file:

copy file

Where file is test.txt and I want revision 1 so the final file name is testREV1.txt.

Posted: 15 Sep 2009 10:22
by avery_larry

Code: Select all

set /p INPUT=Revision of file:
move test.txt testREV%INPUT%.txt