I accidentally made a directory that had a .py ending and so I want to delete this directory in command prompt. I do not know how can someone give me the command I should use for this? I basically want to delete the actual directory. I am on windows 10 and the directory is empty.
Asked
Active
Viewed 140 times
0
-
what operating system? rm -rf for mac, rmdir or rd for dos. Is it empty? – Jeremy Kahan Aug 12 '18 at 22:16
-
yeah, its an empty directory and I'm on windows 10. – Hrittik Chatterjee Aug 12 '18 at 22:18
-
rd *.py (or actually fill in the name) should do it. – Jeremy Kahan Aug 12 '18 at 22:21
-
If you need fancier see https://stackoverflow.com/questions/97875/rm-rf-equivalent-for-windows – Jeremy Kahan Aug 12 '18 at 22:22
-
Thanks Jeremy rd *.py worked. – Hrittik Chatterjee Aug 12 '18 at 22:49
1 Answers
0
Because the directory was empty and it was a Windows system rd *.py
worked. For more complicated cases more general answer has lots.

Jeremy Kahan
- 3,796
- 1
- 10
- 23