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