Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HT Determine If Directory Exists
Message
From
22/02/1999 05:15:56
 
 
To
21/02/1999 21:46:20
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00189851
Message ID:
00189899
Views:
10
>Is there a way to macro substitute for the directory name to be used with DIRECTORY()? For example, I want to check to see if the directory "D:\photoeye\books" exits.
>
>lcName="D:\photoeye\books"
>
>IF DIRECTORY(&lcName)
> MKDIR "books"
>ENDIF
>
>This doesn't work. What am I missing?

DIRECOTRY() takes a character expression rather than an name - don't macro-expand the variable. IOW, DIRECTORY(lcName) would be correct, unless lcName contained the name of a variable that contained the string to check.
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
Reply
Map
View

Click here to load this message in the networking platform