Hi,
We have to schedule an Batch file which connects to an FTP site and download files on the last working day of every month.
Our query is to calculate the weekday given an particular date of a month.
Please guide us on the above.
Regards
Sanjay
Monthly Download of Files
Moderator: DosItHelp
-
- Posts: 40
- Joined: 25 Jan 2008 14:05
I think this might depend on regional settings to make things quick and easy.
On my XP box:
on my win2k box
Just extract the name from the output.
Other wise some kind of math calcualtion is going to have to be performed.
Or just have a separate text file with the start day of each month for the next few years or whatever, then just calcuate the difference.
On my XP box:
Code: Select all
C:\>echo %date%
25/06/2009
on my win2k box
Code: Select all
Z:\>echo %date%
Thu 25/06/2009
Just extract the name from the output.
Other wise some kind of math calcualtion is going to have to be performed.
Or just have a separate text file with the start day of each month for the next few years or whatever, then just calcuate the difference.
-
- Posts: 319
- Joined: 12 May 2006 01:13
download GNU coreutils and use the GNU date command
Code: Select all
C:\test>date_gnu.exe "+%A" -d "2009-06-29"
Monday
-
- Expert
- Posts: 391
- Joined: 19 Mar 2009 08:47
- Location: Iowa
You found the right website -- just needed to look in a different place:
http://www.dostips.com/DtTipsDateTime.php
http://www.dostips.com/DtTipsDateTime.php