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)
Can anyone help with this?
For Each File in Folder for Data\temp
- If CurrentFile.Name.Contains(“Product”) Then Move File to Product folder
- Else Move File to Add Data folder
There are some ways to achieve it. The following is one of them using switch.
Sample20230602-1L.zip (3.9 KB)
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?
Also, the destination folders are outside of the project scope.
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?
Sample20230602-1L (2).zip (4.0 KB)
The expression seems lack of ToLower method. Please add .ToLower as the following
Thanks a lot! That has worked
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.