General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only