View Single Post
  #7   Report Post  
Chris
 
Posts: n/a
Default


"Karl Townsend" remove .NOT to reply wrote
in message anews.com...
The file backup utility in our sales program has crashed and burned.

I need to make a batch file that I can just have the operator click on the
icon and run it. One command I need help with is a MD command having a
unique name for each date. Any format for date would be fine. The file
would go something like this

CD\SALES
MD today's date
CD today's date
COPY C:\SALES\*.DBF
COPY C:\SALES\*.CDX

I know this is totally way off topic. Almost as bad as discussing
politics. Metal content: The SO put her foot down, I can't start welding
on the next project until this is fixed. We have a scraper, dozer and
trackhoe here building the pad for the new machine shop. Need a custom
metal grate for the highway culvert right now.

Karl


Karl,

Not sure of which version of Microsoft you are using. Might need to specify
as the commands vary somewhat.

md %date:~-4,4%\%date:~-10,2%\%date:~-7,2%

This is a neat trick off the top of my head. It creates a tree of
directories (ie. year, than the month then the day), making it a little
easier to navigate. Should work fine for you. I found this years ago and
it works great. Use it in a couple of places.

CD %date:~-4,4%\%date:~-10,2%\%date:~-7,2%

Would work as well.


--
Chris

If you can read this, thank a teacher. If it is in English, thank a
soldier. If it is in ebonics, thank your Congressman.