` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Create (deep) directories
2003-02-04 -- Jeff Slarve
 
Here's something that I use. !============================================== DeepMkDir PROCEDURE (String pPath)!,Byte !============================================== !Copyright 2000 c Jeff Slarve MakePath CString(File:MaxFilePath) Ndx1 Long Ndx2 Long PathLen Long SavePath CString(File:MaxFilePath) ReturnVal Byte CODE ReturnVal = 0 PathLen = Len(Clip(pPath)) SavePath = LongPath() SetPath(pPath) If ErrorCode() If pPath[1:2] = '\\' !UNC Ndx2 = 3 Ndx2 = Instring('\', pPath,1,Ndx2) Ndx2 = Instring('\', pPath,1,Ndx2+1) else Ndx2 = 1 end Loop Ndx1 = Instring('\', pPath, 1, Ndx2) If NOT Ndx1 If Ndx2 <= PathLen Ndx1 = PathLen Ndx2 = Ndx1 else Break end end MakePath = pPath[1:Ndx1] SetPath(MakePath) If ErrorCode() If MkDir(MakePath) ReturnVal = True Message('Error creating: ' & | MakePath,'Error!',Icon:Exclamation) Break end end Ndx2 = Ndx1 + 1 end end SetPath(SavePath) Return ReturnVal


Today is May 4, 2024, 11:52 pm
This article has been viewed 35109 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: