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

martin

Re: WinSCP TSQL Script Issue

If the problem is about starting a .bat file, it does not seem to be relevant to this forum. Please consider asking on https://superuser.com/ or similar.
0xygen

WinSCP TSQL Script Issue

Hey everyone,

my .bat file that opends a .txt file works fine when i doubleklick it or start it with a cmd window. But when i try to start it with XP_CMDSHELL in TSQL nothing happened. I have created an trigger that should sync 2 folders after an insert / update was made. Well the insert / update is fired and i got my callbacks (so it works fine) but the sync is not working. I called it like this:
SET @cmd = 'sync.bat'; exec xp_cmdshell @cmd;

Well as i said i read the documentation and so on. Everything works fine except starting the .bat file from tsql / xp_cmdshell.

Anyone can help me?