Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HELP! MD command creating directories with no name...
Message
 
To
09/05/2001 16:10:36
Bob Clark
Complus Data Service, Inc.
St. Petersburg, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00505513
Message ID:
00505518
Views:
25
>I was recently working on a program which used 'md' to make directories on the server....went something like this
>
>1 cServer='\\server\'
>2 cDirectory='0054\'
>3 cSubDirectory='sub\'
>4 md cServer+cDirectory
>5 md cServer+cDirectory+cSubDirectory
>
>This is a more simlified version of what I was doing but the idea is the same.
>
>When running the program as a prg it worked.
>When running from within a form it was creating directories with no name (shouldn't be possible and the OS sure didn't like it.) Any time I'd try to delete the folder with no name it would freak out and create more of them as subdirectories under the first....and I mean hundreds and hundreds of them. Same result when I tried to a test directory on my local machine...same result when I tried to move them....it just made more subdirectories.
>
>Stepping through the debugger i realized that the value of cServer+cDirectory in line 4 of the code above wasn't '\\server\0054\' as expected...it was
>'\\server\0054\'+200 some spaces. So I alltrimed the values and the code works fine now (doesn't explain to me why...but solved the problem.) My big problem now is that my server still has these 'no name' directories and I can't get rid of them!
>
>Any advice (other than 'Don't test your programs on the production server!') would be greatly appreciated.
>
>Thanks,

Bob,

Is the code shown exact? I ask because md cServer + cDirectory when used in this context should produce (or at least does in my test on a local drive) a directory named cServer beneath the current local directory (regardless of the value of the cServer variable). Did you mean: md (cServer + cDirectory)?

As far as deleting them, I'd be inclined to try to use the WSH and write a script to do it. Haven't tested it though.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform