Access denied batch copy file

April 7, 2011 at 14:42:19
Specs: Win 7 Ultimate , 4.17Ghz 8GB ram
When I copy a file from a batch file to application data in windows 7 it says access denied. Is there any way to get around this?

See More: Access denied batch copy file

Report •

April 7, 2011 at 15:00:13
Application Data is a legacy pointer for old XP programs and doesn't actually exist as a true file location. The actual location you want to copy to is C:\Users\username\AppData or for the locally logged in user you can use the global variable %appdata%

Report •

April 7, 2011 at 19:15:30
oh shoot sorry i ment program data. im copying rules for malware bytes its C:\ProgramData\Malwarebytes\Malwarebytes' Anti-Malware

Report •

April 9, 2011 at 02:17:09
Have you tried running as Administrator?
Do you have access rights to the folder? Or is it replacing an old file?

If it's replacing one, you could add some code to the .bat file to grant yourself permission with CACLS:


Or perhaps

SET /P Q=Please enter your PC USERNAME

Either choose the file you are trying to overwrite, or the path of the FOLDER you are trying to write to. This will grant you full control.

Report •

Related Solutions

Ask Question