Topic "WinSCP TSQL Script Issue"

Author Message


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?
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26889
Location: Prague, Czechia
If the problem is about starting a .bat file, it does not seem to be relevant to this forum. Please consider asking on or similar.

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License