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 <r...@i.frys.com>
> To: Irfan Sayed <irfan_sayed2...@yahoo.com>
> Cc: Shlomi Fish <shlo...@shlomifish.org>; "pa...@laposte.net"
> <pa...@laposte.net>; Perl Beginners <beginners@perl.org>
> 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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to