Today we will discuss on how to transfer file without regular expression. Later we will apply regular expression to transfer "selective file" (file which will follow predefined pattern).
Step 1: Create a new project as explained in below image-
Step 2: Drag and drop File component and configure the path as shown in below image (You may choose any path from your system). This path will be your source path.
Step-3: Add Logger and drag another file component with below path. This will be used for Destination folder.
Step-4: Lets execute the project and place a file in source folder and as per below log it is expected to be transferred as shown in below image log.
Step-5:
Now we will declare a pattern like ^[a-zA-Z]*.txt$ which will check filename if it has character name and extension as txt - if all satisfy file will be transferred.
I have placed abc.json and def.txt in source folder. As per above logic, def.txt should be transferred and abc.json will be rejected.
Let's execute the project and per below logic it;s working as expected - only def.txt has been transferred to destination folder.
Only def.txt has been transferred to destination folder.
Happy Learning! Stay Tuned for next tutorial.
Step 1: Create a new project as explained in below image-
Step 2: Drag and drop File component and configure the path as shown in below image (You may choose any path from your system). This path will be your source path.
Step-3: Add Logger and drag another file component with below path. This will be used for Destination folder.
Step-4: Lets execute the project and place a file in source folder and as per below log it is expected to be transferred as shown in below image log.
Step-5:
Let's execute the project and per below logic it;s working as expected - only def.txt has been transferred to destination folder.
Only def.txt has been transferred to destination folder.
Happy Learning! Stay Tuned for next tutorial.
Thank you so much for your post. Keep on sharing
ReplyDeleteMulesoft Online Training
Mulesoft Training in Hyderabad
Thanks for your information. Plz keep sharing.
ReplyDeletemulesoft training
best mulesoft training
I really enjoy the blog article.Much thanks again.
ReplyDeleteMuleSoft online course
MuleSoft onlinetraining from india