Delete Files and Directories
|
Original Message
|
Name: Janet
Date: February 10, 2003 at 08:40:24 Pacific
Subject: Delete Files and DirectoriesOS: WIndows 2000CPU/Ram: (2) 1.6 with 2GIG RAM |
Comment: I'm trying to write a bat file that will go out and delete a specific directory and all of it's files. First question the person do you want to do this? Then answer and delete ALL files and directories in one action. I know how to do it in UNIX rm -r but what's the best way in Windows 2000?
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Jennifer SUMN
Date: February 10, 2003 at 08:49:39 Pacific
Subject: Delete Files and Directories |
Reply: (edit)Where is the folder located? The reason I ask is because you say "Go Out". Go out where? You need to be a little more specific.
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: jrshannon
Date: February 10, 2003 at 08:51:32 Pacific
Subject: Delete Files and Directories
|
Reply: (edit)I'm using PeopleSoft and want to delete a specific directory D:\bea\hrdmo\Cache and all it's files and directories that it has made.
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: Buster65
Date: February 10, 2003 at 09:06:11 Pacific
Subject: Delete Files and Directories
|
Reply: (edit)deltree.exe Delete Tree (all files) -------- Deletes a directory and all the subdirectories and files in it. To delete one or more files and directories: DELTREE [/Y] [drive:]path [[drive:]path[...]] /Y Suppresses prompting to confirm you want to delete the subdirectory. [drive:]path Specifies the name of the directory you want to delete. Note: Use DELTREE cautiously. Every file and subdirectory within the specified directory will be deleted.
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: mick
Date: February 10, 2003 at 10:02:55 Pacific
Subject: Delete Files and Directories |
Reply: (edit)The following should work (ammend the path as you see fit.... @ECHO OFF CLS ECHO Type 1 for DELETION OF TEST DATA ECHO Type 2 to Exit CHOICE /C:12 CHOOSE 1 0R 2 IF ERRORLEVEL 2 GOTO ITEM2 IF ERRORLEVEL 1 GOTO ITEM1 :ITEM2 EXIT GOTO END :ITEM1 ECHO ARE YOU SURE? RMDIR C:\TEST /s GOTO END :END
Report Offensive Follow Up For Removal
|
|
Response Number 5
|
Name: Janet
Date: February 10, 2003 at 10:59:13 Pacific
Subject: Delete Files and Directories |
Reply: (edit)Does the deltree still exists in Windows 2000? Looked on several machines here at work and can't find it. Is this shareware?
Report Offensive Follow Up For Removal
|
|
Response Number 6
|
Name: mick
Date: February 10, 2003 at 13:28:48 Pacific
Subject: Delete Files and Directories |
Reply: (edit)deltree doesn't exist in windows 2000. rmdir does the job you are after.
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: