Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Directory() does not work
Message
 
 
To
22/09/2008 10:00:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01349457
Message ID:
01349460
Views:
44
>
>IF !directory("c:\ProgramData")
>	MKDIR "c:\ProgramData"
>ENDIF 
>
>
>I receive an error. MKDIR tells me that the directory couldn't be created because there is a sub-directory in it.
>
>Why the directory() function didn't catch it?

My guess is, the directory in question has Hidden or/and System attributes set. I used WSH last time I had to deal with directory like that.
loFso = CREATEOBJECT("Scripting.FileSystemObject")
IF NOT loFso.FolderExists(lcPath)
	loFso.CreateFolder(lcPath)
ENDIF
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform