Hello all,
I typically move a number of files using VBA using very simple code (sometimes its FileCopy instead of NameAS):
The cells values that the code references typically look like this: "C:\Users\drew\Desktop\REPORTING\test01.txt"
Though in some cases there are formulas that drive the particular file name.
Now, I have a new batch of files to move around, but I've encountered a problem, and various things online don't quite seem to be working for me. Now the folder that these file are in stays consistent, but there are unknown characters in each file name. The First part of the file name would be something like: "GL Print", and the end of the file name will be "07-29-2021.pdf" and the middle is unknown. My challenge is that there are dozens of files that have the same Prefix, and dozens also that have the same Suffix. But one file will be the correct file, and once found, I will need to NameAs the file to a new location and name.
Any help getting this right would be greatly appreciated.
I typically move a number of files using VBA using very simple code (sometimes its FileCopy instead of NameAS):
VBA Code:
Name Sheets(2).Range("F26").Value As Sheets(2).Range("F27").Value
The cells values that the code references typically look like this: "C:\Users\drew\Desktop\REPORTING\test01.txt"
Though in some cases there are formulas that drive the particular file name.
Now, I have a new batch of files to move around, but I've encountered a problem, and various things online don't quite seem to be working for me. Now the folder that these file are in stays consistent, but there are unknown characters in each file name. The First part of the file name would be something like: "GL Print", and the end of the file name will be "07-29-2021.pdf" and the middle is unknown. My challenge is that there are dozens of files that have the same Prefix, and dozens also that have the same Suffix. But one file will be the correct file, and once found, I will need to NameAs the file to a new location and name.
Any help getting this right would be greatly appreciated.