Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get a collection of sub folders from a parent folder
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00288982
Message ID:
00289126
Views:
37
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform