scheduled tasks - Multiple commands in batch file -
i have batch file have scheduled run in task scheduler, doesn't seem run second command "forfiles" when task runs. here batch file:
sqlcmd -s web01\sqlexpress -u username -p password -i "d:\backupprograms\cslogsbackup.sql" forfiles /p "z:\logs" /s /m *.bak /d -7 /c "cmd /c del @file"
is there needs go between sqlcmd , forfiles lines?
if click on batch file , run manually works fine, not delete older files in "forfiles" line when batch files runs in task scheduler.
Comments
Post a Comment