Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a directory
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01110310
Message ID:
01110333
Views:
15
>Hi everybody,
>
>I have the following code:
>
>if not directory(thisform.cInputDirectory)
>			md (thisform.cInputDirectory)
>		endif
>		lcDir = thisform.cInputDirectory + "Batch_" + ;
>				transform(crsBatch_Imports.iBatch_Number)
>		if not directory(m.lcDir)
>			md (m.lcDir)
>		endif
>
>The cInputDirectory has a \ at the end.
>
>The first portion of the code returns an error "The directory already exists" on md (thisform.cInputDirectory) command.
>
>What could be the problem? \ at the end or user rights? If the second, the error message is misleading.

The problem maybe that directory is hidden. If so, use adir instead:
?adir(atemp,justpath(thisform.cInputDirectory),"DH") && No backslash at the end !
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform