Rename multiple files with dos or vb script
Posted on 2013-12-09
Hi all, I have a task to do some FTP file moves that will get appended with a job class id and date and time stamp. My issue is that I don't want to have to rename these files manually before each upload. Scenario:
Files are pulled from site using a wild card of mget xyz*
sample list of files:
The files then have to be sent to another location as such
12062013 is the date time that gets appended to the front of the file
xyz* is the actual file name
jobclassid can be something like bhby123
txt is the extension of course
So, is there is way in dos or vb scripting to look at the list of files and append the variables to produce the files with the MMDDYYYY_HHMMSS_filename_jobclassid.txt?
The actual filename may or may not change, but the date and time obviously will.