Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename Multiple File Names in Windows XP Professional 5.1
I have approx 1,000 files in which the file name begins with BPM[space]unique
name.####. I would like to change all of the files to read BPM[dash].unique name.#### without renaming each file individually. Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Rename Multiple File Names in Windows XP Professional 5.1
Works with Excel 2003 and earlier - if you have Excel 2007, you need to use DIR instead of
FileSearch. Change the folder to your path, or uncomment the Thisworkbook.Path line and store the file with the macro in the same folder as your BPM files..... Sub RenameFiles() Dim oldName As String Dim newName As String With Application.FileSearch .NewSearch .LookIn = "C:\Folder Name" '.LookIn = ThisWorkbook.Path .FileType = msoFileTypeAllFiles .SearchSubFolders = True ' Careful with this option... If .Execute 0 Then For i = 1 To .FoundFiles.Count If .FoundFiles(i) Like "*\BPM *" Then newName = Replace(.FoundFiles(i), "\BPM ", "\BPM-") oldName = .FoundFiles(i) Name oldName As newName End If Next i End If End With End Sub HTH, Bernie MS Excel MVP "Chilired" wrote in message ... I have approx 1,000 files in which the file name begins with BPM[space]unique name.####. I would like to change all of the files to read BPM[dash].unique name.#### without renaming each file individually. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple windows of single file display on windows taskbar | Excel Programming | |||
Most times I run Microsoft Excel 2003 Professional, Windows Installerruns first | Excel Discussion (Misc queries) | |||
windows is configuring my microsoft office xp professional | Excel Discussion (Misc queries) | |||
Excel 2003 using Windows XP Professional | New Users to Excel | |||
Rename Multiple Sheets from a List of Available Names | Excel Programming |