TIP: Click on subject to list as thread! ANSI
echo: foxpro
to: DAVID POWELL
from: BRIAN COPELAND
date: 1997-02-24 19:21:00
subject: Fox Puzzler

DP>MSGID: 1:124/1208.0 330fdaf0
DP>Hi All:
DP> 
DP>It's been quite a while since I posted my last puzzle.  I thought it
DP>time to renew the effort.  I have the answer and will post it next
DP>week. Let's see if you can figure it out.
DP> 
DP>You have an application which stores data in various subdirectories
DP>under it.  You use SET DEFAULT TO to enter each subdirectory for its
DP>local processing.  While there you might sort, search and SQL-SELECT.
DP>To be brief, any old data manipulation process you care to name.
DP>When done, you have your application return to the parent directory
DP>where the app resides.
DP> 
DP>Another feature of your application is that it will remove a
DP>directory. Isn't RD wonderful?  Of course, you cannot remove a
DP>directory that is not empty.  So, your application includes a loop
DP>similar to the following:  
DP>   jnFiles = ADIR( jaDumpIt, "subdir\*.*" )  && subdir = where data
DP>   resides IF jnFiles > 0                            && ~~~~~~
DP>      FOR jj = 1 TO jnFiles
DP>          ERASE jaDumpIt[ jj, 1 ]
DP>      NEXT
DP>   ENDIF
DP>Alas!  Although this nearly always works, sometimes you get a File is
DP>Open error.  So you insert a CLOSE DATA statement prior to the loop.
DP>No good.  The file in question is a .TMP file that Fox is using.
DP> 
DP>You want the application to delete the files and remove the
DP>You directory. don't trust the user to do this in Windows or DOS.
DP>You (Do you?) 
DP>Your mission, should you decide to accept it, is to reply to me this
DP>week with a solution -- elegant or otherwise.  I'll post mine next
DP>week.  It may surprise some of you....until you think about it a
DP>second.  
DP>David in Dallas.
How about using Config.fp to assign the temp files to their own 
directory?
Brian.Copeland@encode.com  (Brian Copeland)
--- QScan/PCB v1.17b / 01-0313
---------------
* Origin: Encode Online Orillia,Ont.705-327-7629 (1:252/305)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.