When trying to delete a file from a network location via windows (I am on windows 7) batch file using a "del" command with /f and /q flags, I see an "Access is denied." message, and the file is not deleted. However, I can successfully delete the file manually through the windows explorer.
I have been running the batch file with my personal user account, which should use the same permissions as manually deleting through windows explorer.
There is nothing special about the file I am trying to delete, it is a blank text file that I created for testing after I noticed that some of our automation code couldn't delete files from this location.
This issue is only present on one specific network share, in all other locations, I can delete files with windows batch files with no issue.
Additionally, I can successfully create a text file in the network location in question without any problems via a batch file. It is just the delete command that gives me the "Access is denied." issue.
My account is in a group that does not have access to the Share holding the folder in question, but does have access to the folder on the share. The way the security is setup for this network location is as follows:
Where the group my account is in has "modify" access to Folder1 and Folder2, but not Share.
Edit: The command line in question, as requested:
del \\Server\Share\Folder\TEST_FILE.txt /F /Q
Does anyone know any network/security phenomenon that could be causing this issue, and how can I fix it?