.bat to script file
Hello there
I newly created a bat file for a ftp job automation and the same is running fine from command prompt but from windows task scheduler it is giving error so I want to convert it to script file, could you please tell me how to do that .
I newly created a bat file for a ftp job automation and the same is running fine from command prompt but from windows task scheduler it is giving error so I want to convert it to script file, could you please tell me how to do that .
"C:\Program Files\WinSCP\WinSCP.com" ^ /log="C:\Users\Admin\Desktop\FTPAuto\WinSCP.log" /ini=nul ^ /command ^ "open ftp://uname:password@ftp.demo.com/" ^ "option confirm on" ^ "lcd C:\ftp" ^ "get -neweronly *.mdf" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success SwithMail.exe /s /x "C:\Users\Admin\Desktop\FTPAuto\Success_Mail.xml" ) else ( echo Error SwithMail.exe /s /x "C:\Users\Admin\Desktop\FTPAuto\Fail_Mail.xml" ) del C:\Users\Admin\Desktop\FTPAuto\WinSCP.log exit /b %WINSCP_RESULT%