How to select only .xlsx files in some directory and move them to destination

Suppose we have some directory containing files then how can we move .xlsx files to somewhere else.

Approach 1: Using “Get File Names” + “Move Files”

  1. Get File Names

    • Folder: Specify the source directory where your files are stored.

    • Regex/Filter: Use a regex to pick only .xlsx files. A correct regex would be:

      .*\.xlsx$
      

      Explanation:

      • .* → any file name

      • \.xlsx → ends with .xlsx

      • $ → end of string

  2. Move Files

    • Use the output list from “Get File Names” step.

    • Destination Folder: Specify where you want the files to go.

:white_check_mark: Advantage: Gives you control over the files you’re moving and allows pre-processing (like logging, filtering, etc.).


Approach 2: Using “Move Files” with Filter Directly

  1. Move Files step has built-in options:

    • Source Folder: Your original folder.

    • File Filter/Regex: Directly put:

      .*\.xlsx$
      
    • Destination Folder: Where the files should go.