Sign in to follow this  
Followers 0

Delete folder and subfolders

6 posts in this topic

Posted

Hello all

I try to delete a folder and all subfolders

i used the fonction DirRemove(folderpatch, 1)

In the help file, the value 1 force the remove of all subfolders

but it doesn't work

All the subfolders and files in it are wet here

So the parent folder is not deleted

Is there someone who know how can i delete all

Please help me

Keyser

Share this post


Link to post
Share on other sites



Posted

i have resolve my issue by a fichier batch

with command rd /S /Q folder

this command dos delete folder, files and all subfolders

if someone konw another issue

Share this post


Link to post
Share on other sites

Posted

DirRemove works for me, are you sure you are using it correctly

Share this post


Link to post
Share on other sites

Posted

if the compiled exe-file is located in the same folder you'd like to delete

it won't work, cause currently executed programms can't be deleted.

but the subdir's shoud vanish anyway...

Share this post


Link to post
Share on other sites

Posted

i have resolve my issue by a fichier batch

with command rd /S /Q folder

this command dos delete folder, files and all subfolders

if someone konw another issue

<{POST_SNAPBACK}>

RD /S /Q will not work on windows 98 or NT 4.0. I don't know about ME or 2000. The older versions of windows used the DELTREE command instead.

Share this post


Link to post
Share on other sites

Posted

Windows 9x-based systems:

cd <dir>
del /s/q *.*
cd ..
rd <dir>

Windows NT-based systems:

del /f/s/q <dir>\*.*
rd <dir>

I'm sure there's some DLL that's been around since Win95 that would probably provide an object-oriented way to do this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0