Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Modifyning strings in batch files

FloFlo Posts: 6Member
Hello,

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?

Thanks!





Sign In or Register to comment.