/p when used with DEL

ron

Aug 19, 2008
147
0
del /p /s /x /a:d f:\test\*.*

Was testing a command to remove all the empty folders in a path. Had a question about /p. I was expecting a prompt but didn't get one. It did remove all the empty folders and left files alone though. Just curious what the expectation should be using /p.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
3,770
47
Albuquerque, NM
prospero.unm.edu
DEL /P prompts before deleting each file. If you also specify /A:D, no files will match, so you won't get any prompts. /P also overrides the default prompt you get when you specify a wildspec of * or equivalent.
 
Reactions: ron