Hi,
I’m trying to set up a VBA macro to copy a list of files to another directory.
Up until now I’ve been using FileCopy and building up the directory path of the source file and telling it what output directory to use – nice and straightforward
There’s now been a change to the naming convention of the files however that has broken this.
Whereas the source files used to be called something like
Accounting_File_1_12032018.txt
(and it was easy to get the macro to recognise this with a bit of code to deal with the changing date)
However, now all the source files are preceded by a long string of alphanumeric random characters which may change – but the length of which is always the same e.g.
Asd8fa9f78sd7f9a87df9s7f_ Accounting_File_1_12032018.txt
8asdf84978sdf7a98sdf7s9e_Accounting_File_1_13032018.txt
Is there any way I can get my macro to identify the correct files only by using the right-hand side of the name of the file (which can be predicted)
Thanks
I’m trying to set up a VBA macro to copy a list of files to another directory.
Up until now I’ve been using FileCopy and building up the directory path of the source file and telling it what output directory to use – nice and straightforward
There’s now been a change to the naming convention of the files however that has broken this.
Whereas the source files used to be called something like
Accounting_File_1_12032018.txt
(and it was easy to get the macro to recognise this with a bit of code to deal with the changing date)
However, now all the source files are preceded by a long string of alphanumeric random characters which may change – but the length of which is always the same e.g.
Asd8fa9f78sd7f9a87df9s7f_ Accounting_File_1_12032018.txt
8asdf84978sdf7a98sdf7s9e_Accounting_File_1_13032018.txt
Is there any way I can get my macro to identify the correct files only by using the right-hand side of the name of the file (which can be predicted)
Thanks