Hi, after years I started working with batch scripts again, but I can't delete a file under the main "C" directory, (using W10 last release), this is the script that gives me "Access denied". ----------------------------------------------- @echo off cls del "C: \ SYSTAG.BIN" / A / F / Q / S exit -------------------------------------------------- What command should I add, if it is possible to do so? Thank you
It seems to be related to aomei backupper & I think this file should be automatically deleted after uninstalling that software.
No matter what command, but all commands should be written correctly. Even one wrong thing is too much. In your example is too many incorrectly.
You've got extra spaces where there shouldn't be. /A should specify a file attribute(s) (/A:S) in a del command but isn't needed here anyway, and /S isn't needed because a file can't have a subdirectory. The filename doesn't need to be in quotes since there are no spaces. I don't know if you need to take ownership of the file or not but it won't hurt anything. Run this as administrator. Code: ----------------------------------------------- @echo off cls takeown /f C:\SYSTAG.BIN /a del C:\SYSTAG.BIN /F /Q exit --------------------------------------------------
@kaljukass @pf100 This file seems to be related to Aomei backupper so I am not sure deleting this file without clearing the situation first is a good idea.Also if this file is being protected by some aomei service/driver(with system privilege) running in background then which type of cmd command can delete it anyway.