How to check for this optional download?

Hi,

i have a situation where i need to check my last item whether exists or not then download the file, for my example below item 4 every month this file sometime is there, some time is not how can i check for this in such case ? The name for this file is always the same through different month

Example

  1. A File
  2. B File
  3. C File
  4. D FIle

@xxGoRpa

Can you specify where are you checking?

If you have names that you can check and if on website use element exists with the innertext property with the name that you see on site…it gives false then no item

If on shareoint find files with return nothing if not found IsNothing(result) can be used

For local or network drive we can use path exists or file exists activity

Try providing more detaila for a pin point answer

Hope this helps

Cheers

Hi there i am checking the Description name before download from a website

The first few front name will always be the same as this is the key to identify the different file

@xxGoRpa

Then go with the first appeoach use a element exists and it would give you found ot not

Your selector mostly looks like this

<webctrl tag=‘a’ innertext=‘the starting name*’ />

This is only illustration use ui explorer to get the correct selector and use * in innertext where the text varies

Hope this helps

Cheers

Hi @xxGoRpa,

You can check if file exists with starting name by using following query.

FilesExists (Boolean) = Directory.GetFiles(folderPath, “StartingName*.*”).count>0

Hope it helps.

Reagrds,
Harshith

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