If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Batch file with dates

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-15-04, 10:09
sjumma sjumma is offline
Registered User
 
Join Date: Oct 2003
Posts: 232
Arrow Batch file with dates

i run batch file everyday for yesterday(say 14)

How do i make that run today(14) for yesterday say 1 am and pass this

batchfilename 714 (7 for month and 14 for yesterday at say 1 am on 15 th)

for i do many copy commands in that batch file and i need to pass yesterday's date. I am doing from MS DOS


like
copy n:\local\verifs1\%1?????.ver n:\local\schncube\ver\%1?????.ver


thanks
__________________
bigfoots

Last edited by sjumma; 07-15-04 at 10:31.
Reply With Quote
  #2 (permalink)  
Old 07-15-04, 11:35
SiverSloth SiverSloth is offline
Registered User
 
Join Date: Jun 2004
Posts: 29
Try perl

Did yopu notice that this is Unix shell scripts?

DOS batch has very few useful utilities and is hopeless at date manipulation. You would do best to install a perl interpreter and run a perl script (www.perl.org)
You might manage using kixtart or an other DOS based script language but once you learn perl you'll never use anything else!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On