Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Tore Bleken
  Where is Tore Bleken?
 Stokke
 Norway
 Tore Bleken
 Tags
Subject: RE: MD/MKDir vs MKDirs()
Thread ID: 394051 Message ID: 394062 # Views: 44 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Monday, December 30, 2013 10:54:01 AM         
   


> > Hello Guys,
> >
> > I shared MKDirs() function in my blog thinking someone outside of foxite may need that small function.
> > http://sandstorm36.blogspot.com.au/2013/12/mkdirs-create-folder-and-missing-sub.html
> >
> > But then fellow foxiter (and countryman) Dale Dedoroy has posted a comment saying MD/MKDir native functions do not pose any problem in creating sub-folders on his end. He is using SP2, so I am wondering is this a SP issue/bug?
> >
> >
> > Try running this on your end:
> >
> >
MD c:\one\two\three\ sample \with. space
> >

> >
> > In my end (I don't have SP), it creates sub-folder up to "three" only.
> >
> > Now try this:
> >
> >
MD 'c:\one\two\three\ sample \with. space' 
> > 

> >
> > In my end, it creates up to " sample ". Then generated an error.
> >
> > MKDirs(), on the other hand, was successful in creating all sub-folders up to the last one. Very curious!
> >
> >
> >
> >
> >
> >
> > https://vfpx.codeplex.com/releases/view/99045
> > http://sandstorm36.blogspot.com
>
> I use VFP9SP2.
>
> The first line gives no error, and will create c:\one\two\three. Since there's a space between "c:\one\two\three\" and "sample \with. space", and MD only accepts one parameter, "sample \with. space" is correctly ignored.
>
> The second line gives an error, "Invalid path or file name". So clearly MD doesn't accept spaces in the directory name. I think this is a good thing, since I hate spaces in directory names. However, I accept that some people may disagree.
>
> I also tried these commands from the DOS command prompts, and got similar errors on the second one. So there seems to be some consistency, if you want to create a directory with a space in it, you must create it separately.
>
> There's a fine line between helping and adding to the confusion.
>
> How to create sample data


Thanks Tore and Vilhelm for doing the tests. I guess Dale has performed tests without spaces and dots on folder names on his end. My fault as well as when I checked said blog earlier I fail to emphasize that Native MD fails on sub folders with spaces and dots, which that small function MKDirs() fixes.





https://vfpx.codeplex.com/releases/view/99045
http://sandstorm36.blogspot.com

ENTIRE THREAD

MD/MKDir vs MKDirs() Posted by Jun Tangunan @ 12/30/2013 4:03:28 AM
RE: MD/MKDir vs MKDirs() Posted by Vilhelm-Ion Praisach @ 12/30/2013 7:11:20 AM
RE: MD/MKDir vs MKDirs() Posted by Tore Bleken @ 12/30/2013 9:37:54 AM
RE: MD/MKDir vs MKDirs() Posted by Jun Tangunan @ 12/30/2013 10:54:01 AM
RE: MD/MKDir vs MKDirs() Posted by Cetin Basoz @ 12/30/2013 7:07:58 PM