- Joined
- Apr 12, 2004
- Messages
- 1,101
- Reaction score
- 0
I've been searching around for a while.. looking for a DOS command to delete all files and folders within the specified directory, without deleting that specified directory.
rmdir foldername /S
Will delete the specified folder, but thats easily mended by calling mkdir foldername afterwards.
del c:\path to folder\*.*
wildcards ftw =)
You obviously can't search, or you were too lazy to read through the command reference -.-
MS-DOS deltree command help
move "C:\Documents and Settings\Owner\Desktop\*.*" "C:\Documents and Settings\Owner\Desktop\unsorted"
move "C:\Documents and Settings\Owner\Desktop\Unsorted" C:\Unsorted
move "C:\Documents and Settings\Owner\Desktop" C:\unsorted
md "C:\Documents and Settings\Owner\Desktop"
move C:\unsorted "C:\Documents and Settings\Owner\Desktop\unsorted"
move "C:\Documents and Settings\Owner\Desktop\unsorted\*.lnk" "C:\Documents and Settings\Owner\Desktop"
pause
But if I understand you're trying to remove your desktop folder? Which will not work, since its a system folder and is protected. The only way you can do such thing is login with a other account which is privileged to remove the folder (a administrator account).
xcopy the entire desktop\ to some other directory, then empty desktop\ with del *.*.I'm trying to move or copy then delete all the folders on my desktop without moving or deleting my desktop folder
Isn't manually moving so fast&easy you've already spent way more time typing than you'll ever spend with actually moving those files by hand?
Such a macro would treat the symptoms of your problem, but not cure the problem itself. You're certainly using your system in a very bad way if you need to clean up your desktop more often than once a month. Sounds like you use your desktop as the place to store everything you download.. to that I strongly advice checking your default paths for everything you do.
I know this all is avoiding your question, but the solution to that probably takes a little more advanced scripting tool and seems more difficult than changing the way you deal with your files in common use.
And obviously you don't scan your links very well, or you'd know that deltree hasn't been included in windows for the past 9 years![]()
Sure there is. Pick a programming/scripting language, give it 5 minutes and there you have it. If you want to take this road but feel awkward with programming, get AutoIt. I always recommend it to anyone who needs to script anything from opening notepad to macroing actions in a game.. hell, I even made a lightweight hunting bot on it once.So I guess theres no way to do it the way I wanted
Sure there is. Pick a programming/scripting language, give it 5 minutes and there you have it. If you want to take this road but feel awkward with programming, get AutoIt. I always recommend it to anyone who needs to script anything from opening notepad to macroing actions in a game.. hell, I even made a lightweight hunting bot on it once.