How to keep the Attachment files in UiPath Directory so that they can be used in any system?

Hi all. I am trying to upload a few pdf files on google drive. Is there any way that I can keep those pdf files in a directory so that they can be uploaded from any other system? Thanks in advance for any kind of help.

HI @Muhammad_Bilal2

First of all what will be source of those PDF attachment files is it from mail or it will be stored some where like sharedrive

  • If Mail Download the attachments and move the attachment from downloads to project directory

  • If from some other folder You can move the files to the project directory from the source file and you can use them like this example.

Environment.CurrentDirectory+"\UploadFiles\Input.PDF"

Regards
Sudharsan

Thank you @Sudharsan_Ka for your response. Let me rephrase my question. How to simply move the files to the project directory? This may sound like a very simple thing to do but I’m new to UiPath so can’t find the way to do so.
Thanks again.

What you need to do is

  • Use Move file activity
    • Source will be the Previous file path.
    • Destination will be Environment.CurrentDirectory+"\Input.PDF"

This will simply move the file from one path to the project location

If you have multiple file you need to do this

  • Use For each file in folder give your path (up to folder) and pass the extension you need
    • Use Move file activity
      • Source will be the CurrentFile.ToString
      • Destination will be Environment.CurrentDirectory+""+Environment.CurrentDirectory+""+CurrentFile.Name

Currentfile.Name will return you filename.extension

Regards
Sudharsan

Thank you. It has solved the problem.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.