Delete all files in Dir or delete Dir 
Author Message
 Delete all files in Dir or delete Dir

I need to delete a directory.  I have DAS Tools and can delete the directory
but it must be empty first.  Only method I can see to empty the dir is to
set up a queue and...

is there an easier way or a simple template?



Fri, 18 Oct 2002 03:00:00 GMT  
 Delete all files in Dir or delete Dir
Quote:

> I need to delete a directory.  I have DAS Tools and can delete the directory
> but it must be empty first.  Only method I can see to empty the dir is to
> set up a queue and...

> is there an easier way or a simple template?

No but there is a harder way.  If you want to delete to the the recycle bin or
show a graphic during delete, the api shfileoperation will do that and show
the animation exporer uses as well as delete the files.
-------------------
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com


Fri, 18 Oct 2002 03:00:00 GMT  
 Delete all files in Dir or delete Dir
How about using the DOS command deltree ?  Probably need Powerrun as well.
HTH
David Beggs

Quote:
> I need to delete a directory.  I have DAS Tools and can delete the
directory
> but it must be empty first.  Only method I can see to empty the dir is to
> set up a queue and...

> is there an easier way or a simple template?



Sun, 20 Oct 2002 03:00:00 GMT  
 Delete all files in Dir or delete Dir


Quote:
> is there an easier way or a simple template?

There is a function called rmdir that allows you to remove a
whole directory.

The prototype for the MAP would be:

   RmDir(*CSTRING dirname),SHORT,C,RAW,NAME('_rmdir')

Create a CSTRING and put your fully-qualified directory name in
it and then call RmDir.

-- Craig (The Data Ferret)
http://www.pcferret.com/ for RARS,
BlackICE ClearICE NeoTrace links
Using Virtual Access 5.01 build 301 in Win98
CPD 2.1 CDD 3.x C5WE L&L LSP SecWin
CPCS CCS CLACom WinEvent CWA CM2 CSS AppMan
JANUS/Ada 83 95 Fort Cach
"Do not meddle in the affairs of FERRETS..."



Sun, 20 Oct 2002 03:00:00 GMT  
 Delete all files in Dir or delete Dir


Quote:
> RmDir(*CSTRING dirname),SHORT,C,RAW,NAME('_rmdir')

OOPS! Leave the ",C" out!! Correction:

RmDir(*CSTRING dirname),SHORT,RAW,NAME('_rmdir')

-- Craig (The Data Ferret)
http://www.pcferret.com/ for RARS,
BlackICE ClearICE NeoTrace links
Using Virtual Access 5.01 build 301 in Win98
CPD 2.1 CDD 3.x C5WE L&L LSP SecWin
CPCS CCS CLACom WinEvent CWA CM2 CSS AppMan
JANUS/Ada 83 95 Fort Cach
"Do not meddle in the affairs of FERRETS..."



Sun, 20 Oct 2002 03:00:00 GMT  
 Delete all files in Dir or delete Dir
http://www.dlcwest.com/~sorev/topspeed - ABC Free Templates and Tools
- Use the ShFileOp class.
Quote:
>I need to delete a directory.  I have DAS Tools and can delete the directory
>but it must be empty first.  Only method I can see to empty the dir is to
>set up a queue and...

>is there an easier way or a simple template?



Sun, 20 Oct 2002 03:00:00 GMT  
 Delete all files in Dir or delete Dir
I did it by using a queue.  It was actually pretty painless. Thanks for your
suggestions.


Quote:
> I need to delete a directory.  I have DAS Tools and can delete the
directory
> but it must be empty first.  Only method I can see to empty the dir is to
> set up a queue and...

> is there an easier way or a simple template?



Mon, 21 Oct 2002 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. delete all files in a dir

2. delete complete content of a dir

3. Dir.pushdir and Dir.popdir

4. dir or not to dir

5. Delete key on keyboard deleting records

6. Deleted procs not deleted???

7. Keyboard Delete button to delete row in array

8. bug(?): menu delete operation always deletes at least one entry

9. delete or not to delete

10. no of file in sub dir

11. outputing a dir listing for use as a file sorter

12. How to Get Windows Dir info with file dates

 

 
Powered by phpBB® Forum Software