Is there a way to rename then move, or move then rename a file using wild cards for the file name, or using only part of the file name.
I know wild cads are risky, but I am certain that only the files in question will be altered.
Many of these files are media of one kind or another, so the file extensions vary, .wav, .avi, .mp4 and the same for music files. In some cases there is no extension at all, but all of these are .lnk files or .url files, but it is not only the extension that requires the wild card. The file naming system of the past was willy nilly, no apparent rhyme or reason for the current file name. I would like to rename these files using a file naming system that would follow a standard has some significance to the file itself, other than just a name
I have found several leads on the net, the best given here -
http://www.ozgrid.com/forum/showthread.php?t=162768&p=746639#post746639
given by [FONT="Verdana"]jindon,
[/FONT]
which uses
Sub test()
Dim fn As String
Const myDir As String = "c:\testA\" '<- alter here
Const newFolder As String = "c:\testB\" '<- alter here
fn = Dir(myDir & "red_*.csv")
Do While fn <> ""
FileCopy myDir & fn, newFolder & Replace(fn, "red", "blue")
fn = Dir
Loop
End Sub
This at least allows the use of wild cards. However, the code makes a copy first, which takes time for the larger files.
Any help would be appreciated
awsmitty