Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Delete folder and subfolders


  • Please log in to reply
5 replies to this topic

#1 keyser

keyser

    Seeker

  • Active Members
  • 18 posts

Posted 16 August 2005 - 10:45 AM

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







#2 keyser

keyser

    Seeker

  • Active Members
  • 18 posts

Posted 16 August 2005 - 11:07 AM

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

#3 BigDod

BigDod

    The Mayor of Mirth

  • Jokers
  • 8,563 posts

Posted 16 August 2005 - 11:30 AM

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

Time you enjoyed wasting is not wasted time ......T.S. Elliot

Suspense is worse than disappointment................Robert Burns

God help the man who won't help himself, because no-one else will...........My Grandmother

Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.BigDod2.gifbd1.png


#4 rakudave

rakudave

    Polymath

  • Active Members
  • PipPipPipPip
  • 245 posts

Posted 16 August 2005 - 11:56 AM

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...

#5 blindwig

blindwig

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 772 posts

Posted 16 August 2005 - 04:05 PM

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.

#6 rmorrow

rmorrow

    Seeker

  • Active Members
  • 28 posts

Posted 16 August 2005 - 11:50 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users