>BTW, I noticed a weird behavior not related to your routine. Part of the overall objective of this app is to clean up temp files from certain areas on a server, hence the need to drill down through folder structures. The following code works:
>
>SET DEFAULT TO "VFP98\Projects\Cleanup\Backup\"
>lcFile = "Test.Bak"
>ERASE &lcFile
>
>The Test.Bak file is deleted fine. But if instead my default is set to some other directory (such as the one the app is running in), then the following WON'T work:
>
>lcFile = "VFP98\Projects\Cleanup\Backup\Test.Bak"
>ERASE &lcFile
>
>....but the following will work:
>
>lcFile = "VFP98\Projects\Cleanup\Backup\Test.Bak"
>ERASE (lcFile)
>
>It *seems* VFP's ERASE command is another one that is picky about the way you do macro substitution. Ever seen this one?
Yes - never use macro expansion where the result of the macro expansion is a name with a character that can be treated as a command line separator, or it will break. For all intents and purposes, the rule of avoiding macro expansion in any name statement is a good one.