Use the Find files and folder
action to return a table of files and their properties inside of a specified
folder, the Loop
action to loop through each row in the table, and a One
Drive
action to perform an operation on every file in the table.
Procedure
To perform an action on every file in a folder, do the
following steps:
-
Double-click or drag .
-
Provide your username with either a credential variable or an unencrypted value.
-
Enter the file path of the folder in which to perform the search.
-
Select the All items in folder option.
You can alternatively select Specific file (or folder)
to limit the search to a specific folder on your OneDrive.
-
Select or create a table variable to hold the output.
The table variable holds information on files and folders in rows, under the
following columns: name, id, createdBy, creationDate, lastModifiedBy,
lastModificationDateTime, parentFolder, and Path.
-
Double-click or drag the Loop
action.
-
Select the For each row in table iterator.
-
Select the table variable holding the output from step 5.
-
Select or create a record variable to temporarily hold each row.
Insert the action inside of the Loop
container that you want to repeat on every file in the folder. This example uses the
Download file
action.
-
Double-click or drag .
-
Provide your username with either a credential variable or an unencrypted
value.
-
Enter the following in the File name including path
field, replacing the generic variable names with the names of the record
variables from step 10:
$RecordVariable[7]$/$RecordVariable[0]$
-
Enter the path to the folder where to download the files.
-
Click Save.