Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP a file with an unknown filename

Status
Not open for further replies.

stiej

Technical User
Jan 20, 2003
142
GB
Hi,

I've attempted to execute a cmd line process running ftp.exe with the -s switch along with a file containing a list of commands but encountered a hurdle when trying to pass in the name of the file to be ftp'd to the file of ftp-commands that ftp.exe was trying to run.

How can I within DTS ftp a file where the filename will be inside a globalvariable?

Any ideas?

Thanks in advance...

 
From a DTS pacakge you can Execute the following SQL Statement.


[tt]
declare @data
select @data='FTP Command that you created.'
exec master..xp_cmdshell @data
[/tt]


Dr.Sql
Good Luck.
 
You can also use the MPUT and MGET commands in FTP which accept wildcards.

For example
MPUT t*.txt would upload all files that start with t and have a txt extention.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
Donate to Katrina relief
 
Excellent, thanks to you both. Didnt know about the mput/mget commands. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top