Access denied problem

June 14, 2009 at 22:02:30
Specs: Windows XP
G'day. I have a Firewall programme which creates a new .log file at each bootup. I have tried to make a batch file to delete the redundant files at bootup without success with the "Access is denied" error message appearing. I have tried the delete, erase, rename, and move commands with the various switches within simple batch files without success. The only command which works from the batch file is the attrib command, but even with the attributes removed I can go no further. However if I enter the directory through Explorer I can rename (file name and extension), delete files within the directory, cut and paste and copy and paste all of these files to a remote drive. A deletion batch file directed to this remote directory does in fact delete the files, however I cannot move the files to this remote directory for deletion.
I am the only user of the computer and have full Administrative privileges across the board. This situation only exists on the Log directory of the Firewall programme, and the redundant files are not locked by the initiating programme.
Can anyone out there give me a clue as to whether or not these files can be deleted with a batch file or am I doomed to have to manually delete these files when I remember to do so. Thanking you.

See More: Access denied problem

Report •

June 15, 2009 at 00:30:35
Perhaps this file is protected by user permissions.

You could try giving yourself full control since you have an admin account:

echo y|cacls <filename> /g "%username%":f

Report •

June 15, 2009 at 01:32:17
Thanks for the reply. Tried your solution, together with other switches. No joy, I'm afraid. The command gave a message thaqt the file was processed, however I was still unable to delete using a batch file. Thanks for your assistance.

Report •

Related Solutions

Ask Question