Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 11th, 2008, 10:53 PM   #1
Jabo
Not a user?
 
Join Date: Sep 2007
Posts: 253
Rep Power: 1 Jabo is on a distinguished road
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:

batch Syntax (Toggle Plain Text)
  1. ftp -s:file_retrieve.txt

file_retrieve.txt looks like this now:

script Syntax (Toggle Plain Text)
  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:

script Syntax (Toggle Plain Text)
  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
Jabo is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch Question NightShade01 Other Programming Languages 3 Jun 20th, 2006 5:39 PM
Question on files ktsirig PHP 5 May 4th, 2006 12:29 PM
Any good books dealing with Batch files? Chris Bash / Shell Scripting 4 Mar 18th, 2006 8:34 PM
Question about cleaning out temp files Prm753 C 2 Nov 16th, 2005 8:08 AM
Batch Files Skinner Other Programming Languages 4 Apr 28th, 2005 8:03 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:46 PM.

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