Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Deleting all files in a directory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00776809
Message ID:
00776812
Vues:
30
>I have been reading the threads here on deleting all files from a directory and have some questions/concerns.
>
>The environment would be VFP 7 runtime with O/S W98, ME, 2000 and XP PRO.
>The specific problem that I have is with the file 'thumbs.db' which is a hidden file that has been added (on my XP PRO pc) to a subdirectory that contains .jpg's.
>
>If I use erase, the file is not deleted. If I use adir() the file is in the resultant array, but again does not delete. If I try to remove the 'hidden' attribute with 'run attrib -h filename.ext', the attribute is not removed.
>
>One of the recommendations suggested using Windows Script Hosting.
>But can't this feature be disabled and therefore my application would not function properly?
>
>Also, according to previous threads, it is optional in W98.
>
>Lastly, I am concerned about forcing the end user to install/enable Windows Script Hosting.
>
>Thank you in advance for any advice.

If the file is "open" or in use by some other program that's still active, you can't delete it. That's possibly what you're seeing.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform