Link to home
Start Free TrialLog in
Avatar of gthgb
gthgb

asked on

Recersive Delete

okay i know i have asked this one before but...
how do you delete a folder and all the folders in it...
cant use vb script "filesystemobject" as virus scanners think its a malicious script *cough* norton *cough*
and i cant use deltree (no support on nt/2k/xp)
so is there a way i can delete a directory and its contents (there are sub directorys) or everything in the directory (including the subfolders)
Avatar of peterdownes
peterdownes

rmdir /S
RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory in addition to the directory itself.  Used to remove a directory tree.

/Q Quiet mode, do not ask if ok to remove a directory tree with
Avatar of gthgb

ASKER

erm okay.. well first im going to admit to a booboo i made.. i dont think this is in the vb section

second whenever i attempt to use "/s" vb expects an expression.. am i doing something wrong?
ASKER CERTIFIED SOLUTION
Avatar of twalgrave
twalgrave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately.
To cleanup this TA, I will recommend to moderators that this question is:

*** Accept twalgrave ***

Please leave any comments here within the next seven days, or finalize the question if you own it

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Intern
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange