Hi, my process needs to loop through PDF files in a folder, read some data, use the data to rename the file, then move the renamed file to an output folder.
My first attempt was done using “Directory.GetFiles(In_FolderPath)” in a “For Each” loop but had issues so trying a different approach. I can grab the data I need but moving them becomes an issue - the move file says it can’t find it after I rename it and i even tried to move the file then rename it and still a no go.
So…
I now have it set up with “For Each File in Folder” loop but not sure how to set the the read to the current File - it gets mad at me.
This activity will loop through each file in the specified folder.
Ensure the folder path is correctly set.
Inside the body of the loop make sure it is CurrentItem.FullName
Read Data from the PDF:
Use appropriate PDF activities to read the required data from the current file.
like read pdf text
use logic to read and search for keyword using .equals or .contains method
Rename the File:
Construct the new file name based on the data read from the PDF.
Move the Renamed File:
Use the Move File activity to move the file to the output folder.
You can do the rename within the Move File activity by simply specifying the filename, not just the path, in the destination property of the Move File activity.