Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
HT Change FileNames?
Message
De
17/04/1999 23:54:45
 
 
À
17/04/1999 17:45:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00209423
Message ID:
00209463
Vues:
15
Rixon,

I think this code may accomplish what you need, you should only have to modify the first two lines.

cd && to the directory you wish
SET PATH TO && to the same directory
llReplaceName = .F.
FOR i = 1 TO ADIR(laOldFileName)
lcNewFileName = laOldFileName(i,1)
FOR j = 1 to LEN(lcNewFileName)
IF SUBSTR(lcNewFileName,j,1) = " "
lcNewFileName = LEFT(lcNewFileName,j-1) + "_" + ;
SUBSTR(lcNewFileName,(j+1))
llReplaceName = .T.
ENDIF
NEXT
IF llReplaceName and NOT FILE(lcNewFileName)
RENAME laOldFileName(i,1) TO (lcNewFileName)
llReplaceName = .F.
ENDIF
NEXT
SET PATH TO



Hope It Helps
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform