You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
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.
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...
batch file
credentials
directory
mapped drives
network sharing
path
permissions
remote copy
run whether user is logged on
run with highest privileges
scriptdirectory
source path
start folder
system account
task scheduler
unc path
windows 10
windows 11
xcopy