Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need a method to create a file path from passed string.
Message
 
 
À
19/02/2010 15:59:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01449783
Message ID:
01449973
Vues:
41
Where is the class itself? Is it freely published?

Thanks again for sharing.

>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.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform