Irfan Sayed wrote: > i need that command which will delete all files and directoreis > recursivley along with root dir and read only files > > i did in this way > > C:\>del /F /S /Q c:\test > > but c:\ still has test folder and subfolder > using above command only files are getting deleted and not empty folders > > plz suggest > > > > > ________________________________ > From: Ron Bergin <[email protected]> > To: Irfan Sayed <[email protected]> > Cc: Shlomi Fish <[email protected]>; "[email protected]" > <[email protected]>; Perl Beginners <[email protected]> > Sent: Monday, June 27, 2011 8:39 PM > Subject: Re: rmdir > > Irfan Sayed wrote: >> even i tried windows del command >> but it prompts for confirmation to delete the files >> do u know how to suppress these prompts ? i did not find any switch >> which >> allows you to suppress >> >> pls suggest. >> >> regards >> irfan >> > > You need to use the /s and /q and /f options. > > /F Force deleting of read-only files. > /S Delete specified files from all subdirectories. > /Q Quiet mode, do not ask if ok to delete on global wildcard > > --
Since rmdir doesn't have the /F switch, simply use 2 commands. The first one uses "del /s /f /q" to delete the files and the second uses "rmdir /s /q" to delete the directories. -- Ron Bergin aka Fishmonger -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
