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:
00776814
Vues:
23
The file is on my local PC and the hard drive is not available on the network.
Also, the file thumbs.db is not open - at least by any of my applications.
Windows Explore is not running.
Other than that, I really don't know what the operating system XP PRO has open.

>>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.
Regards,

Allan Coganovitch
allanc@proven-solutions.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform