Page 1 of 1

Deleting hidden and read-only files with pure Batch [SOLVED]

Posted: 04 Jul 2025 10:37
by DOSadnie
Is it at all possible to use only a single UTF-8 BAT file and be able to find e.g.

P:\Excel file deletion test\hidden and read only\~$test file for potential deletion.xlsm

and delete it successfully?

I have no problem with doing this using a PS1 file, but I would like to do it using only Batch

Re: Deleting hidden and read-only files with pure Batch

Posted: 04 Jul 2025 12:10
by aGerman
You mean someting like this?

Code: Select all

del /f /a "D:\somewhere\whatever file.ext"
Steffen

Re: Deleting hidden and read-only files with pure Batch

Posted: 05 Jul 2025 08:41
by DOSadnie
Yes, thank you

I had to make sure I can go to basics for test purposes, because some of my more elaborate code somehow stopped working [viewtopic.php?f=3&t=12104&p=71384#p71384]. I think I need to take a break because its all getting mixed up in my head