Forum Discussion

olunic's avatar
olunic
Occasional Contributor
7 years ago

Upload multiple Files

I am testing a web application where it opens a file selector to choose files that are uploaded.  I was able to use 'OpenFile' to upload a single file but I need to be able to select and upload more than one files at a time.  How could I achieve this?  Optionally if I can drag and drop multiple files using windows explorer that would would be helpful.

  • I think you can open multiple files by using spaces in the first parameter of OpenFile. It at least works for Notepa++

     

    function test() {
      let window = NameMapping.Sys.Process("notepad++").Window("#32770", "Open", 1);
      window.OpenFile('"C:\\New Text Document (2).txt" "C:\\New Text Document.txt"');
    }

    I would not reccomend dragging and dropping multiple files, that would likely prove to be very unreliable. 

  • cunderw's avatar
    cunderw
    Community Hero

    I think you can open multiple files by using spaces in the first parameter of OpenFile. It at least works for Notepa++

     

    function test() {
      let window = NameMapping.Sys.Process("notepad++").Window("#32770", "Open", 1);
      window.OpenFile('"C:\\New Text Document (2).txt" "C:\\New Text Document.txt"');
    }

    I would not reccomend dragging and dropping multiple files, that would likely prove to be very unreliable. 

    • olunic's avatar
      olunic
      Occasional Contributor

      It worked.  Thank you Carson.