Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Running Cmdexec in SQL Server Job

$
0
0

Hi Everyone,

I wanted to run a scripts in a job to clean up my folders in SQL Server 2005. The scripts is as below:

for /f %%i in ('dir /b /s /AD F:\ASCC_FileStore\CITIntegration') do cscript D:\Scripts\BizTalk\BizTalk_WMI.vbs -maintainfolder "%%i"

No error was happening when it was executed in a batch file.

but when I ran it in a SQL job, I got below error:

%%i was unexpected at this time.

Could you please give me some advice? Thank you very much.

regards,

Oliver


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>