Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove sub-directory programmatically
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482991
Message ID:
00483005
Views:
18
That was my reason for suggesting that it may be being used that way. However, thinking further, it may be that the directory is not empty. IOW if you create files in there, you can't just remove the directory, you have to delete all the files in it first. I'll bet that's the problem.

>Possibly so, but in this case it sounds to me like the tempsdir is being used for application work files as opposed to Foxpro's temporary/cache files. One could easily tell by examining the contents of C:\Jobname\temp prior to executing the rd command. If the temp files were say index files on cursors or the like, then a close all should close them.
>
>Scott
>
>>Actually I would more expect that there are still active temp files in there. I think you would need to change the tempfile directory, and that may not even work. I don't think that a close all closes temp files.
>>
>>>Is it possible that your current default directory is "tempsdir" when you are attempting to perform the rd command? I believe you will get an "access denied" error in this case.
>>>
>>>Scott
>>>
>>>>i thought some house-keeping is in order when dealing with a lot of temp files. so i create a temp sub-directory as a working area and remove it when i quit the project.
>>>>
>>>>my init codes are:-
>>>>publ tempsdir
>>>>tempsdir='c:\Jobname\temp'
>>>>md (tempsdir)
>>>>
>>>>in my quit cmdbutton, its click code is:-
>>>>
>>>>clos all
>>>>rd (tempsdir)
>>>>
>>>>but i get an "access denied" message. how can i rectify it? ta
Cy Welch
Senior Programmer/Analyst
MetSYS Inc
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform