FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old February 1st, 2008, 06:43 AM
sail87 sail87 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 4 sail87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 18 m 51 sec
Reputation Power: 0
Need to set-up Windows ftp utility w/variable for a file name.

I am trying to write an ftp utility in wsh or vbs that will go out to the site, log in, ftp the latest files and close. I have a script that works, however I need to substitute a string variable for the file name. This utility will be used sporadically (it's a backup to an automated process) and the file names include the date and time. I can easily create a string with the correct filename using the date function, but I can't figure out how to get the utility to use the string variable. Below is a sample of the code that works (albeit with the filename).

Is there a way to use a variable in this code, or is there another way to do it? I'm not married to the code used here, so if a total new approach is needed I'm fine with that.

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.run "FTP -i -s:C:\Temp\testftp\ftpfile.txt",1
Set WshShell = nothing

below is the contents of the text file ftpfile.txt
open ftpsite address
username
password
mget FILE_0123_20080131_20080131*.CSV
quit


Any help would be greatly appreciated!

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > Need to set-up Windows ftp utility w/variable for a file name.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway