I have a few batch files that run on a schedule, I have found though that they are not running properly? If I right click the batch file and run as administrator it works fine, after some research I came up with this. set __COMPAT_LAYER=RunAsInvoker I add this as the […]
batch file
3 posts
This problem has nagged at me for years. Here is a batch command to delete files on a Windows 2003 machine. Forfiles -p z:\backup -s -m *.* -d -3 -c “cmd /c del /q @path” This will delete all files in my backup directory older than 3 days. To test […]
This is a simple backup script using a batch file, it writes to a log file, sends the log file by email and then renames the log file by date and time.