Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HT Change FileNames?
Message
From
17/04/1999 23:54:45
 
 
To
17/04/1999 17:45:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00209423
Message ID:
00209463
Views:
17
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform