I'm trying to make a PowerShell script that can copy files to a new destination using a .txt file as a search parameter. The issue I'm having is I don't have the full file extension.
$sourceItemFolder = C:\Art_directory
$targetFolder = O:\Work_Folder
$FileList = C:\VbbList.txt
The list is laid out
191428A1
191435A1
191431A1
191429A1
191430B1
191432A1
They are in a column copied from excel*
The source item Folder has many different folders and inside each folder there is variant of each prefix. The prefix being the first 6 characters of each Reference number 191428
and the variant being A1
Sub-Folder Example-
`C:\Art_directory\191428\191428A1 - Family Where Our Roots Grow Deep 1.625x7.25.jpg`
"191428A1 - Family Where Our Roots Grow Deep 1.625x7.25.jpg"` is the full file name.
The file I'm wanting to copy is always a .jpg
They're about 14k folders in the Art_directory
folder so going through this, typing in one reference# at a time kinda sucks.
Some of the older folders have descriptions after the reference #'s Example-
C:\Art_directory\191428 - Family Where Our Roots Grow Deep
Is it possible to use a txt file as a -Filter or is there another way to go about doing this?