Add a date output to file names

Hello,

I am working with files that have the same name with the exception of the date. I need to select files with certain dates in their names. Which dates I need is not consistent so I cannot base it off of the current day’s date.

Is it possible to add an input box that the needed dates can be added to which will change which files the program will grab?

e.g.
The files are named:
Walmart 071320 sales.pdf
Walmart 071220 sales.pdf
Walmart 071120 sales.pdf
Walmart 071020 sales.pdf
Walmart 070920 sales.pdf
Walmart 070820 sales.pdf

I need to select:
Walmart 070920 sales.pdf
Walmart 070820 sales.pdf

Tomorrow I need:
Walmart 071320 sales.pdf
Walmart 071220 sales.pdf
Walmart 071120 sales.pdf

There is no consistence for which files I need when.
I want to be able to write the dates I need in an input box and it will use those files.
Hopefully this explains what I am trying to say more clearly.

@Love_David_C You can achieve the same by following steps:

  1. Use Input dialog and store output in variable(e.g. pattern) It will be your pattern(date) which you want.
  2. Use Assign activity and Get all the files into array which the #1 pattern Directory.GetFiles(inputFolder,""+pattern+"")
  3. Use For Each to iterate over Array of files(If you want only one file then use file Array variable
    Attached file for your reference
    Sequence13.xaml (5.7 KB) (0))
1 Like