I have 4 files
(PNA KLM Add data_MM_dd_yyyy
PNA KLM Product_MM_dd_yyyy
PCA KLM Add data_MM_dd_yyyy
PCA KLM Product_MM_dd_yyyy
) under Data\temp folder (Source folder) under my project. I want to move them to different folders depending on their names.
send to Product folder product related files (PCA KLM Product_MM_dd_yyyy, PNA KLM Product_MM_dd_yyyy),
send to Add Data folder Add data related files (PNA KLM Add data_MM_dd_yyyy, PCA KLM Add data_MM_dd_yyyy)
The process ran without error but did not move the files.
I’ve a follow up question
How does this expression identify the two different folder paths?
System.Text.RegularExpressions.Regex.Match(System.IO.Path.GetFileNameWithoutExtension(currentItem).ToLower,“product|add data”).Value
Also, the destination folders are outside of the project scope.
something like
Desktop\RPA_Folder\Add Data
Desktop\RPA_Folder\Product
If input is “PNA KLM Add data_MM_dd_yyyy”, the above expression returns “add data”
if input is “PNA KLM Product_MM_dd_yyyy”, the above expression returns “product”
then switch by the result.
I just added some write line activity. Can you try the following and share its logs in Output panel?