Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Programming Languages (http://www.programmingforums.org/forum38.html)
-   -   DOS batch files question (http://www.programmingforums.org/showthread.php?t=15598)

Jabo Apr 11th, 2008 10:53 PM

DOS batch files question
 
I'm trying to set up some batch files to retrieve some files from a server according to the date in the file name and I'm wondering if this will work also in my ftp scripts or if I have to learn scripting to be able to do this

I call my script from my batch file like so:

:

  1. ftp -s:file_retrieve.txt


file_retrieve.txt looks like this now:

:

  1. open server
  2. username
  3. password
  4. binary
  5. lcd c:\temp
  6. get filea20080411.dat filea20080411.dat_1
  7. get fileb20080411.dat fileb20080411.dat_1
  8. get filec20080411.dat filec20080411.dat_1
  9. bye


and I'm wanting to change the get lines to be:

:

  1. get file*%date:~-4,4%%date:~4,2%%date:~7,2%.dat file*%date:~-4,4%%date:~4,2%%date:~7,2%.dat_1


also replacing the 3 lines with one with a wild card


All times are GMT -5. The time now is 3:54 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC