Link to home
Start Free TrialLog in
Avatar of Balbirlally
Balbirlally

asked on

directory delete in VFP9 sp2

Hi Experts
I have a backup folder and everytime I do a backup I create new folder within backup folder and copy files to the new folder. What I like to do  is, delete the folders  that were created before certian date. (i.e delete older backup folders)
Thanks.
Avatar of Allister_Reid
Allister_Reid

Hi,
you can use the following:

fso = CREATEOBJECT("Scripting.FileSystemObject")
fso.DeleteFolder("c:\temp\test")

Replace the path "c:\temp\test" with the directory you wish to delete.


Regards
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Balbirlally

ASKER

it works very well.