Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
HELP! MD command creating directories with no name...
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement