Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim Filename As String
Dim Path As String Path = "c:\MyFolder\" Filename = Dir(Path & "2005*.txt") Do While Filename < "" Name Path & Filename As Path & Replace(Filename, Left(Filename, 8), "FINAL 2005") Filename = Dir Loop " wrote: Hi- I have a bunch of files that all begin with a date - 20051231. After the date is the rest of the filename and this part of the filename varies. What I want to do is REPLACE the 20051231 portion of every file in a specific folder with FINAL 2005. To be more specific....I have over 1,000 files that each start with the date and then go on with a different name for each file. Example: 20051231_FileA 20051231_FileB 20051231_FileC I would like to keep the "FileA" portion of every file....but replace the 20051231 with FINAL 2005. Any ideas? Any help is greatly appreciated!! TIA, Chris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replace letters for numbers | Excel Discussion (Misc queries) | |||
Replace the column letters with my own heading | Charts and Charting in Excel | |||
Formula to replace invalid filename characters | Excel Worksheet Functions | |||
Set Location and Filename to replace GetOpenFilename | Excel Programming | |||
Looking for an easy way to replace letters with acutes | Excel Worksheet Functions |