Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Directory() does not work
Message
 
 
À
22/09/2008 10:00:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01349457
Message ID:
01349460
Vues:
46
>
>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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform