Re: xp_cmdshell copy from ftp site

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Bob,

I'm glad it worked.

Best regards,
Henrik Staun Poulsen
www.stovi.com


On Aug 7, 10:41 pm, "Bob McClellan" <bobmcc...@xxxxxxxxx> wrote:
Henrik,
I got the batch file working.  Thanks again for this advice,
..bob

"Henrik Staun Poulsen" <h...@xxxxxxxxx> wrote in messagenews:ffeb38ce-e45d-44d7-88f6-1f0f1dc67609@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Bob,

I need to upload files to a FTP server, and I've just created a small
upload.bat file, that I get xp_cmdshell to run, after it has created
the files.

upload.bat looks like this:

 ftp -s:upload.dat ftp.myOwnSite.com

upload.dat looks like this:

userid
password
binary
put myfile.txt
quit

Line 1 is the UserID for the FTP site, Line 2 is the password for this
site. Then I use the Binary FTP command, to ensure that it is treated
correctly. Then I upload (put) the file I want and finally I tell it
to quit processing.

FTP.com is a part of Windows, and is installed on all PCs.

Best regards,
Henrik Staun Poulsenwww.stovi.com

On Aug 4, 5:10 pm, "Bob McClellan" <bobmcc...@xxxxxxxxx> wrote:



I am trying to automate a daily process.
I currently download an .xml file each day then
run a sp that shreds and processes it into one of our DBs.

I'd like to create a job to do this.
my thought was to use xp_cmdshell to bring down the file
but my EXEC statement errors out.

EXEC xp_cmdshell 'copyftp://pathToFtpSite/Tuesday_08042009.xml
\\MyServerIp\Data\Downloads'
GO

the output returns
"ftp:" is not a recognized device.
The syntax of the command is incorrect.

Any suggestions on how to automate this process is much appreciated.
thanks in advance,
..bob- Hide quoted text -

- Show quoted text -

.



Relevant Pages

  • Need help with an attack
    ... FTP HACK AND WHAT TO DO ... nothing you can do to secure it, ... allow people to upload files to your web server might be ...
    (microsoft.public.win2000.security)
  • Re: Mac friendly Web hosting
    ... No Dreamweaver on Mac? ... I'll upload files from the command line via FTP most likely. ... No cgi, php, ...
    (comp.sys.mac.comm)
  • Re: Mac friendly Web hosting
    ... Their default service is Linux/Unix. ... Testing is done off of my local BSD system. ... I'll upload files from the command line via FTP most likely. ...
    (comp.sys.mac.comm)
  • Re: MGET command deletes files
    ... >> I then ftp. ... >> Can you double check and ensure the user doesn't have any permissions on ... >> Regards, ... >> Bernard Cheah ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: ftp uploading vs. control panel uploading
    ... > I used to upload files with ftp. ... But recently the ftp on my notebook ... Control panel stuff is all very well for very small sites, ...
    (alt.html)