I'm using this command : cd C:\Users\Administrator\AppData\Local\Temp rd . /Q /S to delete the content of this directory and its subdirectories. So far so good! No problem. But I don't know what this . (rd .) is good for? No documentation nowhere!! Thank you for your help
In MSDOS proper, we used to use Deltree to recursively delete files. I feel like a dinosaur right how... https://stackoverflow.com/questions/338895/what-ever-happened-to-deltree-and-whats-its-replacement
RMDIR "foldername" /S /Q no exclamation mark Delete file/folder -> switches are: /S silent, /Q quiet /S -> Remove a directory tree.
Some of this might be simple stuff to some. But might be of interest to somebody curious about some more obsure Dos commands. Spoiler ========================================================== Using the "." and ".." Current and Parent Directory listing shortcuts ========================================================== ========================================================== Type this from an elevated command prompt C:\>cd \windows\system32 <--------------- ========================================================== ========================================================== Type this from the System32 directory prompt: The /p switch pauses the display at a single screen. C:\Windows\System32>dir /p <--------------- You should see this listing: Volume in drive C is Seagate Volume Serial Number is 0AC2-4B69 Directory of C:\Windows\System32 02/24/2018 04:09 AM <DIR> . <--------------- the single dot represents the current directory 02/24/2018 04:09 AM <DIR> .. <--------------- the double dot represents the parent directory 04/11/2011 11:38 PM <DIR> 0409 11/20/2010 07:30 PM <DIR> AdvancedInstallers 12/24/2015 05:40 AM <DIR> appmgmt 07/13/2009 07:20 PM <DIR> ar-SA 07/13/2009 07:20 PM <DIR> bg-BG 12/22/2015 08:29 PM <DIR> Boot 12/22/2015 08:21 PM <DIR> catroot 02/17/2018 06:12 PM <DIR> catroot2 12/22/2015 08:29 PM <DIR> CodeIntegrity At the "press any key to continue" type Ctrl-C to return to the Dos prompt ========================================================== ========================================================== To get the listing of the current directory of the system32 directory Type this at the System32 prompt: C:\Windows\System32>dir . /p <--------------- use 1 dot/period Volume in drive C is Seagate Volume Serial Number is 0AC2-4B69 Directory of C:\Windows\System32 02/24/2018 04:09 AM <DIR> . 02/24/2018 04:09 AM <DIR> .. 04/11/2011 11:38 PM <DIR> 0409 11/20/2010 07:30 PM <DIR> AdvancedInstallers 12/24/2015 05:40 AM <DIR> appmgmt 07/13/2009 07:20 PM <DIR> ar-SA 07/13/2009 07:20 PM <DIR> bg-BG 12/22/2015 08:29 PM <DIR> Boot 12/22/2015 08:21 PM <DIR> catroot 02/17/2018 06:12 PM <DIR> catroot2 12/22/2015 08:29 PM <DIR> CodeIntegrity 04/11/2011 11:38 PM <DIR> com 02/10/2018 08:06 AM <DIR> config At the "press any key to continue" type Ctrl-C to return to the Dos prompt ========================================================== ========================================================== To get the listing of the parent directory of the system32 directory which is C:\windows Type this at the System32 prompt: C:\Windows\System32>dir .. /p <--------------- use 2 dots/periods Volume in drive C is Seagate Volume Serial Number is 0AC2-4B69 Directory of C:\Windows 02/11/2018 03:59 AM <DIR> . 02/11/2018 03:59 AM <DIR> .. 07/13/2009 07:20 PM <DIR> AppCompat 01/31/2016 05:20 AM <DIR> AppPatch 07/13/2009 09:32 PM <DIR> Boot 07/13/2009 09:32 PM <DIR> Branding 12/22/2015 05:20 PM <DIR> CSC 07/13/2009 09:32 PM <DIR> Cursors 11/27/2016 08:47 AM <DIR> debug 07/13/2009 09:32 PM <DIR> diagnostics 07/13/2009 09:37 PM <DIR> DigitalLocker 07/13/2009 09:32 PM <DIR> Downloaded Program Files At the "press any key to continue" type Ctrl-C to return to the Dos prompt ========================================================== ========================================================== You can also use wildcards with the "." but not the ".." For example, this will give you a listing of all of the directories in the System32 directory Oddly enough the ".." doesn't work with wildcards. Go figure. C:\Windows\System32>dir *. /p <--------------- Volume in drive C is Seagate Volume Serial Number is 0AC2-4B69 Directory of C:\Windows\System32 02/24/2018 04:09 AM <DIR> . 02/24/2018 04:09 AM <DIR> .. 04/11/2011 11:38 PM <DIR> 0409 11/20/2010 07:30 PM <DIR> AdvancedInstallers 12/24/2015 05:40 AM <DIR> appmgmt 07/13/2009 07:20 PM <DIR> ar-SA 07/13/2009 07:20 PM <DIR> bg-BG 12/22/2015 08:29 PM <DIR> Boot 12/22/2015 08:21 PM <DIR> catroot 02/17/2018 06:12 PM <DIR> catroot2 12/22/2015 08:29 PM <DIR> CodeIntegrity At the "press any key to continue" type Ctrl-C to return to the Dos prompt ========================================================== ========================================================== You can use the .(dot) and ..(dot dot) at the command prompt for almost any dos command, except rd (remove diretory) if you are in that directory. And you cannot delete the parent directory (..) either. For example: C:\Temp\foo>rd . <--------------- The process cannot access the file because it is being used by another process. C:\Temp\foo>rd .. <--------------- The directory is not empty.
Thank you PALLADIN your post was the most helpful. All I need to know! but nevertheless, thanks to all others too.