Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to remove an existing directory programatically?
Message
From
18/10/2002 07:32:39
Fabian Belo
Independent Developer
Argentina
 
 
To
15/10/2002 22:22:52
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00711569
Message ID:
00712777
Views:
19
According to the theory
RUN RD /S &Path
it should work but it doesn't.. (Don't know why)
According with Jose Luis Santana (not copyrighted yet :))) you can use 2 APIs:
1) MoveFile (I don't have the sample of this function on hand) to move the directory to another folder like Recent Documents.
2) Empty Recent Documents Folder:
DECLARE LONG SHAddToRecentDocs IN "Shell32";
  LONG lFlags,;
  LONG lPv
=SHAddToRecentDocs (0, 0)
It's a tricky (unclean) way to do it...but it works.

Regards

>Hi all:
>
>I am attempting to first, delete an existing directory and all subfolders within that directory and then create a new directory with subdirectories where needed.
>
>I have tried the RMDIR and RD commands - but get a message that says "File Access is Denied". Clicking HELP tells me that I am trying to write to a protected file (whihc is not true).
>
>Any suggestions? Thank you in advance.
"Since I've read that alcohol is bad... I quit reading."
Me


http://www.fabianbelo.com.ar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform