Discussion:
xp_cmdshell runs bat file that uploads xml file on FTP server
(too old to reply)
g***@gmail.com
2014-04-11 06:44:39 UTC
Permalink
I created bat file , that uploads xml file on ftp server from my computer.
When I use xp_cmdsell for running this bat file it uploads file on FTP server but file becomes empty (0 kb).
What to do? I don't want to loose the data
Erland Sommarskog
2014-04-11 16:02:32 UTC
Permalink
Post by g***@gmail.com
I created bat file , that uploads xml file on ftp server from my
computer. When I use xp_cmdsell for running this bat file it uploads
file on FTP server but file becomes empty (0 kb).
What to do? I don't want to loose the data
Which file is 0 bytes? The local file or the file on the FTP server?

Beware that default folder for xp_cmdshell may not be the same as when
you run manually.

What does drive you run FTP from xp_cmdshell? Why not run it from the
application?
--
Erland Sommarskog, Stockholm, ***@sommarskog.se
Loading...