Upload Multiple Files with CSV

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Riss
Posts: 8
Joined: Tue Jan 24, 2012 12:36 am

Upload Multiple Files with CSV

Post by Riss » Tue Jan 24, 2012 12:57 am

Hi

First time user of iMacro and having difficulty... I hope someone can help.

I'm trying to record a macro that will upload 100s of files one at a time, the file paths have been saved in the first column of a CSV file.

Steps Required=
-GOTO URL
-Select filename from 2nd line in CSV doc
-Submit (repeat)
-GOTO URL
-Select filename from 3rd line in CSV doc
-Submit
-GOTO URL
And so on… 4th line, 5th line. (Set by Play Loop “Max”)

Code I'm using;

Code: Select all

VERSION BUILD=7401110 RECORDER=FX
TAB T=1     
CMDLINE !DATASOURCE filepath.csv
SET !DATASOURCE_COLUMNS 1
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=file:///U:/NG%20Client%20Profile%20Interface/Next%20Gen%20Client%20Profile%20Interface%20-%20Upload%20Templates/CTMSandboxPost.html
CLICK X=112 Y=66      
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:Listing ATTR=NAME:File_Path CONTENT={{!COL1}}
CLICK X=272 Y=70 CONTENT={ENTER}
URL GOTO=file:///U:/NG%20Client%20Profile%20Interface/Next%20Gen%20Client%20Profile%20Interface%20-%20Upload%20Templates/CTMSandboxPost.html
Error I’m receiving; “RuntimeError: element INPUT specified by NAME:File_Path was not found, line: 9 (Error code: -921)”

Can anyone see what I am doing wrong and also foresee any other issues I might run into with this code?
Last edited by Riss on Fri Jan 27, 2012 2:03 am, edited 1 time in total.
Riss
Posts: 8
Joined: Tue Jan 24, 2012 12:36 am

Re: Upload Multiple Files with CSV

Post by Riss » Fri Jan 27, 2012 2:02 am

Finally got the code working... YES!!!
otherwhirl
Posts: 1
Joined: Fri Feb 03, 2012 2:21 am

Re: Upload Multiple Files with CSV

Post by otherwhirl » Fri Feb 03, 2012 2:38 am

Hey, would you mind sharing with me how you managed to get it work?

I too want to upload multiple files via .CSV

Much appreciated,
Thanks!
Riss wrote:Finally got the code working... YES!!!
Riss
Posts: 8
Joined: Tue Jan 24, 2012 12:36 am

Re: Upload Multiple Files with CSV

Post by Riss » Fri Feb 03, 2012 2:57 am

Hey

There wasn't an issue with my code, all I had to do was add a double click - I'll attach code and notes... I hope this helps, let me know if you have any specific questions and I'll do my best to help.

Thanks

Code: Select all

VERSION BUILD=7401110 RECORDER=FX
TAB T=1   
'File path of where CSV doc has been saved.  
SET !DATASOURCE XYZ.csv
'How many columns you want to lookup
SET !DATASOURCE_COLUMNS 1
'Row number you want to loop from (2)Ignores heading row.
SET !LOOP 2
'Start of loop
SET !DATASOURCE_LINE {{!LOOP}}
'URL of Upload Site for upload
URL GOTO=http://URL.com
'Select Upload Field
CLICK X=63 Y=65 
 'Select Upload Field again & Add content from Column 1. This can be repeated if you have several fields to enter. {{!COL2}}{{!COL}} etc
CLICK X=63 Y=65 CONTENT={{!COL1}}
'Selecting Submit
CLICK X=272 Y=70 CONTENT={ENTER}
Post Reply