These are examples. The first is for a single file (or group of files if using wildcards). The second is what you would use to process the entire C: drive, /S meaning to process all subdirectories, and /D meaning to also act on the directories themselves.
I think it's probably impossible to change it from a running Windows. You'll probably have to do it from dual boot, or PE, etc. That said, the disadvantages outweigh the advantages, so it's not a method I can really recommend.
If you do so from the running Windows, it will skip all locked files nonetheless, it just won't show the "Access denied" messages.