Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Guest

Re: Using xp_cmdshell to run a BAT file that uses WinSCP FTP

martin wrote:

So does it log anything or not? Show us any log file you have.

Also make sure you have read this:
https://winscp.net/eng/docs/faq_scheduler


Nothing is logged. The proc just runs and runs.

I will review the link you forwarded.
martin

Re: Using xp_cmdshell to run a BAT file that uses WinSCP FTP

So does it log anything or not? Show us any log file you have.

Also make sure you have read this:
https://winscp.net/eng/docs/faq_scheduler
programmher

Using xp_cmdshell to run a BAT file that uses WinSCP FTP

I am trying to use xp_cmdshell to run a .bat file that uses WinSCP to FTP a .csv file.

I have verified all permissions and can successfully run a .bat file that does not use WinSCP.

I do not get any errors and my xp_cmdshell just runs and runs and runs without logging any errors.

We have created a profile in WinSCP for the SQL server agent that the xp_cmdshell is run.

We can manually run the .BAT file.

How do we resolve this issue to run this .BAT file using xp_cmdshell?