Download Multiple files in a particular folder

Hello Everyone,
My today’s query is to download multiple file in a particular folder.
lets summarise this
suppose I download multiple pdf here I want to download those files in a particular folder (e.g. ABCD).
So please tell me the expression so that I complete my work.

Hi @lakshya_garg1

If you re using chrome to download a file then you can try with below steps.

Chrome Download Settings

Set the static path you need to download file.

Regards

Do you need help in How to download files?

Thanks for reply

I know about this setting this work perfectly,But I don’t want to use this setting.
Is there any process where we did not change chrome setting.

Hi @lakshya_garg1,

A while back I wrote a PowerShell command, which can download zip files from the forum and unzips them to a target folder. You can modify it to suit your usecase i.e., only use the download file part of the script.

This tutorial will show you how to integrate a PowerShell script in UiPath and pass variables to the script. In your case, it might be multiple endpoints (URLs) of your files.

function DownloadSampleFromUiPathForum{
    # This function downloads, unzips files from the UiPath forum given the url of the file.
    param (
        [string]$SourceUrl
    )
# Lets download a sample project file and unzip 
$WebRequest = iwr $SourceUrl   # Invoke-WebRequest to get headers 
$WebRequest.Headers."Content-Disposition" -match -join("\w+.",$SourceUrl.Split(".")[-1])
$FileName = $Matches.0   # This gets us the filename from UiPath forum
$ZipFile = -join("C:\Users\", $env:UserName, "\Downloads\", $FileName)
$ExistsZipFile = Test-Path -Path $ZipFile   
# Lets download only if the file is not found
if($ExistsZipFile -eq $false){
Invoke-WebRequest -Uri $SourceUrl -OutFile $ZipFile 
Expand-Archive $ZipFile
}# if ends
}# function ends

# Calling the download function on the sample file
DownloadSampleFromUiPathForum  'https://forum.uipath.com/uploads/short-url/4j6bRIkvsRdRnsr7BhfcSHIwieF.zip'
1 Like