Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a method to create a file path from passed string.
Message
From
19/02/2010 17:14:03
 
 
To
19/02/2010 15:59:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01449783
Message ID:
01449985
Views:
42
Oops. Never Mind this one.


>OK, guys - There's more than one way to skin a Directory...
>
>Check this out:
>
>I had known that the great Master, Rick Strahl, had created a DotNetBridge class that allows you to call .Net classes from VFP. So, I felt sure that the CreateDirectory() method on the System.Io.Directory class would honor the casing of the string I passed in, so I dug into wwDotNetBridge, and it works perfectly! Plus I learned how simple it is to create and use an instance of a .Net class in VFP using this class lib.
>
>(wwDotNetBridge is included in many of the West Wind software suites)
>
>Here's the simple code:
>
>
>loBridge = CreateObject("wwDotNetBridge")
>
>loBridge.LoadAssembly("C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll")  
>
>loBridge.InvokeStaticMethod("System.IO.Directory", "CreateDirectory", "F:\JOBS\GEM001\TEST")  && Honors case!!!
>
>
>More samples of using wwDotNetBridge are here:
>
>http://www.west-wind.com/webconnection/wwClient_docs/_2940qlt64.htm
>
>
>
>
>
>
>>See http://www.berezniker.com/content/pages/visual-foxpro/creating-directory-preserving-name-case
>>
>>>Anyone know of any utils for VFP that will create a folder path given a passed in string?
>>>
>>>
>>> CreateFolderPath("F:\Quotes\GTH001\12345\")
>>>
>>>
>>>Some parts of the paths may already exist, some may not. I just need it to handle all the relevant issue. If it exists, then fine, it not, create whatever is missing.
Previous
Reply
Map
View

Click here to load this message in the networking platform