Page 1 of 1

Switches /s /q

Posted: 19 Aug 2018 03:00
by ahzong
I found this line of code:

Code: Select all

del /s /q C:\windows\temp\*.tmp
Could anyone explain to me what is code does? I guess it deletes everything in the temp folder.
I can't seem to understand /s and /q especially, nor to make sure they are called "switches".

Re: Switches /s /q

Posted: 19 Aug 2018 03:39
by aGerman
You'll get help for every command if you execute yourcommand /? in a cmd window (del /? in your case). Besides of that we have a Command Index where you can look it up.
However option /s also deletes found .tmp files in subfolders of C:\windows\temp and option /q suppresses the prompt that asks you if you really want to delete all .tmp files because you specified a wildcard (asterisk) that is for "any name".


Re: Switches /s /q

Posted: 19 Aug 2018 04:38
by ahzong
Oh, that's very helpful! Thanks a lot.