Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with Mkdir in tempfolder
Message
From
31/07/2001 07:29:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
31/07/2001 02:49:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00537623
Message ID:
00537680
Views:
24
>Dear All,
>
>We are using VFP5 and are finding problems using MKDIR under Win 2000.
>
>The problem specifically occurs when we get the windows tempfolder and attempt to create a new folder within a subfolder. Attempting to create 1 folder at a time does not cause a problem and if other non-windows folders are used, there is not a problem.
>
>The error can be re-produced using the code below.
>
>Any help, or pointers to an easy workaround would be appreciated.
>
>Thanks
>
>Mace
>
>LOCAL lcTempPath, lnSize, lcCreatePath
>
>lcTempPath = SPACE(255)
>lnsize = 255
>
>DECLARE INTEGER GetTempPath IN WIN32API INTEGER, STRING @
>
>lnSize = GetTempPath( lnSize, @lcTempPath)
>
>lcTempPath = SUBSTR( lcTempPath, 1, lnSize)
>IF RIGHT( lcTempPath, 1) <> "\"
> lcTempPath = lcTempPath + "\"
>ENDIF
>
>lcCreatePath = lcTempPath + "Hello\World"
>
>*-- This error always returns directory already exists
>MKDIR (lcCreatePath)

How about changing the last line to:
MD (lcTempPath + "Hello")
MD (lcTempPath + "\World")
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform