So the files were either read-only or hidden/system (or both) i guess

Code:

Del "$File" /f /h



from the manual

Quote:


Del

Action: Deletes one or more files.

Syntax: DEL "file name" [/c] [/f] [/h] [/s]
/c Continue deleting files, even if error(s) occur.
/f Delete read-only files.
/h Deletes hidden and system files also.

/s Delete specified files from all subdirectories.

Remarks: DEL does not prompt the user to confirm the deletion.
Wildcards are supported.