Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HELP! MD command creating directories with no name...
Message
From
09/05/2001 16:10:36
Bob Clark
Complus Data Service, Inc.
St. Petersburg, Florida, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
HELP! MD command creating directories with no name...
Miscellaneous
Thread ID:
00505513
Message ID:
00505513
Views:
63
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
Next
Reply
Map
View

Click here to load this message in the networking platform