Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting all files in a directory
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00776809
Message ID:
00776817
Views:
34
While this is only a guess, it still sounds like some task that's running, whether it's one of yours or not, has that file open. Have you checked for any virii? Depending on which version of the OS you're using and how you're logged into the system, you may be able to find out what program has that file open.


>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.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform