Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File functions
Message
De
11/12/1998 11:54:42
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00166520
Message ID:
00166621
Vues:
20
>Does anyone have a class/program/whatever for handling things like deleting files and such?
>
>I need to copy a directory with files and other directories to a backup directory, then delete the dir and all the stuff in it. I can do it by going to each directory and deleting and then removing each dir, but I was hoping there was a simpler way.

There are ActiveX solution available if you have the Windows Scripting Host installed; one of the most useful things in there is the Scripting.FileSystemObject, which has a ton of useful methods for folder and file manipulation. You can install the Windows Scripting Host easily enough in an installation; the executable WSH.EXE available from Microsoft will install it on systems that don't already have it (Windows scripting host is built into Win98, WinNT with Option Pack 4, and WinNT5/Win2000.)

Alternatively, you can write VFP-only code to use ADIR(), ERASE, and RMDIR to recursively copy and delete.

>
>No luck finding such a thing in the files section.
>
>Thanks,
>
>-Michelle
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform