View Single Post
  #8   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,
OK got bored here :

xcopy c:\sales\*.dbf c:\%date:~-4,4%\%date:~-10,2%\%date:~-7,2% /I /Y /C
/V
xcopy c:\sales\*.cdx c:\%date:~-4,4%\%date:~-10,2%\%date:~-7,2% /I /Y /C
/V

The two commands above should get you going. Tried to get them into one
command but windows will not allow you to call out more than one filename
from the source, at least that I know of.

Those should do it for you. As a sidenote you really should be using the
xcopy command for this. "xcopy /?" and any command prompt will get you the
info needed. Lot more powerful for what you are doing.

--
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.