Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Renaming a file name with a leading space
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Renaming a file name with a leading space
Divers
Thread ID:
00407286
Message ID:
00407286
Vues:
42
Has anyone run into trouble while attempting to rename a file which has a leading space? I am receiving an error from Visual FoxPro that the file does not exist. I tried:

lcPath = sys(5) + curdir()
gnCount = adir(gaTifs, '*.tif')
for nCounter = 1 to gnCount
cOldName = lcPath + gaTifs(nCounter,1)
cNewName = lcPath + substr(gaTifs(nCounter,1)3,6)
rename &cOldName to &cNewName
endfor

If we manually take out the leading spaces it works... Otherwise we get the file does not exist error.

Any suggestions would be greatly appreciated!

Thanks in advance,
Maria
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform