Avatar of elwayisgod
elwayisgod
Flag for United States of America asked on

Copy files via VB Script

I have this which works fine.  However it needs changed to this logic:  Copy every from source to target that ends with 'oracle_data_mdse.txt' as there will be many that are prefixed with the year.  Don't want to specify each one out.

objFSO.CopyFile "D:\Data\oracle_data_mdse.txt","D:\Output\oracle_data_mdse.txt"
VB ScriptVisual Basic ClassicShell Scripting

Avatar of undefined
Last Comment
dustock

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
dustock

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
elwayisgod

ASKER
I was thinking that but wasn't sure.  How does it ensure the target file is same name as original though?
dustock

Just copy it to the folder D:\Output\ and it will keep the same file name.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy