June 24, 2008 at 8:59 pm
Hi,
Can any one help me to copy the file from ftp server to local server using xp_cmdshell.
Note: I wanted to do this through procedure.
Simple copy command is working fine.
xp_cmdshell 'copy c:\book1.csv d:\book1.csv'
How do I use multiple commands? As I need to connect ftp server and then I need to access the directory and copy a file.
ftp serveraddress,username, pw,get filename.
Thanks in Advance
Keerthy
June 24, 2008 at 9:04 pm
keerthy.vishweshwarachar (6/24/2008)
Hi,Can any one help me to copy the file from ftp server to local server using xp_cmdshell.
Note: I wanted to do this through procedure.
Simple copy command is working fine.
xp_cmdshell 'copy c:\book1.csv d:\book1.csv'
How do I use multiple commands? As I need to connect ftp server and then I need to access the directory and copy a file.
ftp serveraddress,username, pw,get filename.
Thanks in Advance
Keerthy
Make a batch file and the execute the batch file.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 25, 2008 at 12:20 am
Thanks for your suggestion.
Can you just help me to create a batch file
I tried following code:
ftp 3.104.85.96
username
password
get filename
Its opening the command prompt but its asking the username and password.
How to automate this part
Thanks in advance.
June 25, 2008 at 12:38 am
cmd:
ftp -n -s:ftpcommand.txt
ftpcommand.txt:
open hostname
user username
pass password
binary
get filename
quit
June 25, 2008 at 9:51 am
Thanks
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply