RMDIR help

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
Guest
RMDIR help

Post by Guest » Thu Jul 18, 2002 2:13 pm

???hello if I'm writing a qbasic program and I use RMDIR and I also need to use /s/q so it will delete not only the dir but also all the files that are inside the dir. How should I write? ;D

if i write Shell " rd d:\mik /s/q" it doesn't work
if i write Shell "rd d:\mik" it works only if there is nothing in dir. MIK.

please help me!!!!!!!!!

thanks a lot

pebe
Full Member
Posts:33
Joined:Tue Apr 02, 2002 12:19 am
Location:Scotland

Re: RMDIR help

Post by pebe » Sun Jul 21, 2002 4:37 am

Remove all the files in the directory first with:
 
 SHELL" DEL d:\mik\*.*"

Then you can remove the directory.

madmartin55
Newbie
Posts:8
Joined:Tue Jun 18, 2002 12:25 am
Contact:

Re: RMDIR help

Post by madmartin55 » Tue Jul 30, 2002 12:11 pm

That's basically a DOS limitation, Mike, so when you are trying to manipulate the dir structure (file search, add/remove dirs, etc.) you have to follow your DOS command structure. MS-DOS doesn't allow you to remove a dir with anything in it, so pebe's answer is right, but it might be different with a another OS. :)
stuck in a time warp

"Let's do the time warp again!"

Post Reply