script directory

About this tag
The script directory tag on WindowsForum.com covers issues related to batch files and scripts executed from specific directories, particularly when run via Task Scheduler in Windows 11. A common problem discussed is that a .bat file works correctly when double-clicked but fails to copy files when scheduled, often due to the working directory not being set to the script's location. Users troubleshoot by checking the task's 'Start in' option, running with highest privileges, and using output redirection to diagnose errors. The tag focuses on resolving such discrepancies between manual and automated script execution.
  1. S

    Windows 11 Task Scheduler odd behavior

    I have a command file (.bat) I run to copy some files from my Windows 11 PC to another PC. When I double-click the .bat file on my PC, it runs and successfully copies the files. When I run it using Task Scheduler, it runs the command file but no files are actually copied. I piped the output...
Back
Top