Getting the name of the uploaded file

Support
  • Hello. I will upload the photos in a folder one by one. But I want to use filenames to add titles. How can I get the name of the file I will upload?

  • 2024-04-16_204756.png

  • @GaG No, this is not what I'm looking for. It uploads the files in the folder in order of name. I use "|notreuse". I want to transfer the name of the current file to a variable and use it.

  • Than just take full file path from same variable without "|notreuse",
    and extract just filename using string module or javascript.

    Guess youre doing it in a loop, so same variable that you used
    with "|notreuse" will give its content without "|notreuse" in same
    loop cycle.

  • Thank you, I will try this way. So are there different things I can use like "|notreuse"? Do you know if I can have it select files and upload them randomly instead of sequentially? For example, is there something like "|random"?

  • Nope there is no "|random". "|notreuse" is option for resources in BAS.
    You can use it without "|notreuse" but its meant for use in multiple threads,
    so in that case each new browser instance will use different line from resource.
    It looks like you are doing it in one browser instance, so you have to use "|notreuse"
    because of that.

    Other option is to use "File search" and read all files that neds to be
    uploaded into list variable. Than you can use that list and extract needed
    data (title - name of file), and upload according to data in the list, even
    randomize it if needed.