## Switches /s /q

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
ahzong
Posts: 7
Joined: 04 Aug 2018 23:04

### Switches /s /q

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".

aGerman
Expert
Posts: 3643
Joined: 22 Jan 2010 18:01
Location: Germany

### Re: Switches /s /q

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".

Steffen

ahzong
Posts: 7
Joined: 04 Aug 2018 23:04

### Re: Switches /s /q

Oh, that's very helpful! Thanks a lot.