The problem: When I double click the .bat file it executes as expected. When I schedule it in Windows Task Scheduler it executes except the line that has cscript.
Content of .bat file:
@echo off
cls
cscript CSV_To_Excel.vbs c:\tableaudata\test.csv c:\tableaudata\test.xlsx
echo.file converted >>log.txt
What is throwing me off is the fact that log.txt gets created indicating that the .bat file is being executed. But .xlsx is not created. However, on manually double clicking .bat both log.txt and test.xlsx is created.
What could be the problem?
C:\Windows\System32\cscript.exe c:\tableaudata\CSV_To_Excel.vbs c:\tableaudata\test.csv c:\tableaudata\test.xlsx
– BlakeyResult: The task completed with an exit code of (0)
in log? Have you deleted/renamed the log prior to testing? – MichaelemichaelinaMicrosoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved.
– Blakey