Modifyning strings in batch files


I am a complete newbie when it comes to batch files and scripting. Just wrting my first one today to move a set of files received 3 times a day via ftp so they do not get overwritten each time.

My basic vision of it is to create three batch files that would be run through the task scheduler in order to create three seperate directories for the daily transmissions. I am sure that with m0ore knowledge I could do it easily in one batch file but for the sake of being a bgeinner I am going to run the three seperate batch files.

What I am having trouble with is manipulating the date string in order to make a directory out of it. I can append a variable on the end of the date without a problem, but within the date itself there is a space between the the day of the week and the numerical date i.e
"Tue 07/08/2003".

What I would like to do is just parse the 07/08/2003 portion into a variable, but would then also want to remove or change the slashes to something friendlier in the scheme of directory naming. I am familiar with string manipulation in many other languages so I don't need a crash course, just commands to perform these types of operations if there are good methods of doing this. Or should I even move to something along the lines of vb scripting?


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!