Move files contains folder name

Received two types of folder like Supporting Document or Supporting Docs. How to move files to this kind of folder dynamically

Can you elaborate the use case a bit more?

Hello @SURESH_P, I think something like this might work:

  • Sequence
    • Get Files (Source Directory)
    • For Each (File) in Files
      • Assign (Folder Name)
      • Create Directory (Destination Directory + Folder Name)
      • Move File (Source File, Destination Directory + Folder Name)

Cheers!

"D:\UiPath\JE\JE Entry\Property\Artesia Properties\08.2023"+“Supporting*”

If folder name like supporting then file move to this folder

"D:\UiPath\JE\JE Entry\Property\Artesia Properties\08.2023"+“Supporting*”

If folder name like supporting then file move to this folder

like this, I added the "" at the end.

Cheers, try this :slight_smile:

It doesn’t let me write but it’s the backslash.

image

If you have the directory path, you can just check if it contains the text “Supporting” or not (using string operations), or if you have the file only, maybe you can get the folder path using DIrectory.getParent or some string operations and make the checks.