![]() |
Help to rename files
Is there a way I can rename files:
AFT.11.DAT AFT.12.DAT AFT.21.DAT AFT.22.DAT (not the 2 "dots") to SEG11.DAT SEG12.DAT SEG21.DAT SEG22.DAT Thanks Hilton |
Help to rename files
Why don't you just change the names? What is the issue here?
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Hilton" wrote in message ... Is there a way I can rename files: AFT.11.DAT AFT.12.DAT AFT.21.DAT AFT.22.DAT (not the 2 "dots") to SEG11.DAT SEG12.DAT SEG21.DAT SEG22.DAT Thanks Hilton |
Help to rename files
Assume source data in A1 down
In B1: =SUBSTITUTE(A1,"AFT.","SEG") Copy down -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Hilton" wrote: Is there a way I can rename files: AFT.11.DAT AFT.12.DAT AFT.21.DAT AFT.22.DAT (not the 2 "dots") to SEG11.DAT SEG12.DAT SEG21.DAT SEG22.DAT Thanks Hilton |
Help to rename files
Modify this to rename instead of move. Something like this. TEST
oldname = "C:\x\" & FN newname = "C:\y\" & "Sig"& right(FN,len(fn)-3) Sub Movefiles() Application.ScreenUpdating = False Dim FN As String FileLocation = "c:\x\*.xls" FN = Dir(FileLocation) Do Until FN = "" If Mid(FN, 4, 1) = "_" Then oldname = "C:\x\" & FN newname = "C:\y\" & FN Name oldname As newname End If FN = Dir Loop Application.ScreenUpdating = True End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Hilton" wrote in message ... Is there a way I can rename files: AFT.11.DAT AFT.12.DAT AFT.21.DAT AFT.22.DAT (not the 2 "dots") to SEG11.DAT SEG12.DAT SEG21.DAT SEG22.DAT Thanks Hilton |
Help to rename files
=REPLACE(A1,1,4,"SEG")
"Hilton" wrote: Is there a way I can rename files: AFT.11.DAT AFT.12.DAT AFT.21.DAT AFT.22.DAT (not the 2 "dots") to SEG11.DAT SEG12.DAT SEG21.DAT SEG22.DAT Thanks Hilton |
Help to rename files
Don Guillett
Microsoft MVP Excel Congratulations, Don ! cheers. -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
Help to rename files
Glad I understood what you wanted.
-- Don Guillett Microsoft MVP Excel SalesAid Software "Max" wrote in message ... Don Guillett Microsoft MVP Excel Congratulations, Don ! cheers. -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
Help to rename files
"Don Guillett" wrote in message
... Glad I understood what you wanted. Nope, I don't think so. Only the OP, Hilton, can answer that. -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
All times are GMT +1. The time now is 04:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com