Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behavior with MD?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00835981
Message ID:
00835993
Views:
11
Hi Trey,

That's an interesting suggestion. But, if that's what's going on "under the hood", why would the following work?
MD "C:\Documents and Settings\SomeUser\Application Data\test1\"
MD "C:\Documents and Settings\SomeUser\Application Data\test1\test2\"
MD "C:\Documents and Settings\SomeUser\Application Data\test1\test2\test3\"
MD "C:\Documents and Settings\SomeUser\Application Data\test1\test2\test3\test4\"
MD "C:\Documents and Settings\SomeUser\Application Data\test1\test2\test3\test4\test5\"
Any insight you can give to this is greatly appreciated.


>I believe this is what's happening here.
>The Application Data folder is Hidden by default, and its Microsoft subfolder is a System folder by default, both of which VFP is blind to.
>IOW, VFP ignores them when checking for directory existence.
>
>When VFP is given the command to make a directory whose parent directories don't exist, it attempts to create the whole tree. In this case, having ignored the the Application Data/Microsoft folders, it tries to create them, giving the error.
>
>
>>To All,
>>
>>I have just recently run across a problem with the MD command in VFP that perplexes me, which means I must be missing something obvious.
>>
>>If I issue the following in the command window:
>>
>>MD "C:\test1\test2\test3\test4"
>>
>>The entire directory structure is created.
>>
>>However, if I enter something along these lines:
>>
>>MD "C:\Documents and Settings\SomeUser\Application Data\test1\test2\test3\test4\test5"
>>
>>I get an error saying "A subdirectory or file c:\documents and settings\someuser\application data\test1\test2\test3\test4\test5\ already exists."
>>
>>I find this behavior extremely strange and am completely at a loss.
>>
>>Some information that may help:
>>

    >>
  • This behavior can be duplicated in VFP7 SP1 and VFP8.
    >>
  • It doesn't matter whether it is a Windows 2000 Professional or Windows XP Professional OS. (Same behavior)
    >>
  • The "SomeUser" I used above is the user I am currently logged in as, so there aren't any special security privileges/restrictions.
    >>

>>From what I can tell, it only seems to happen if the SomeUser directory exists. For instance if I issue:
>>
>>MD "C:\Documents and Settings\Test New User\Application Data\test1\test2\test3\test4\test5\"
>>
>>everything works ok.
>>
>>Any help on this matter will be very appreciated.
>>
>>TIA,
>>
>>Travis
Travis Vandersypen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform