FILEDELETE overwrite stopped (?) working

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
azbob
Posts: 85
Joined: Mon Sep 21, 2009 6:16 pm

FILEDELETE overwrite stopped (?) working

Post by azbob » Wed Aug 17, 2016 12:25 am

Configuration: Surface Pro 2, Win 10, Firefox 47.0.1, iMacros Standard Edition (x86) Version 11.0.246.4051
Hi,
I have a macro that has been running for months extracting data to csv files for use in other form fill macros. Here is the code I have been using to extract then overwrite prior data and save new.

TAG POS=1 TYPE=TD ATTR=ID:lowLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:ctLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:lowSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiSP EXTRACT=TXT
TAG POS=1 TYPE=SPAN ATTR=ID:ctSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:avgDom EXTRACT=TXT
'Average LP
TAG POS=1 TYPE=TD ATTR=ID:avgLP EXTRACT=TXT
'Average SP
TAG POS=1 TYPE=TD ATTR=ID:avgSP EXTRACT=TXT
'Overwrite old data
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Chasedata.csv
Now what happens is new data is appended to prior. See attached output file.
Thanks
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

Post by chivracq » Wed Aug 17, 2016 1:01 am

azbob wrote:Configuration:

Code: Select all

Surface Pro 2, Win 10, Firefox 47.0.1, iMacros Standard Edition (x86) Version 11.0.246.4051
Hi,
I have a macro that has been running for months extracting data to csv files for use in other form fill macros. Here is the code I have been using to extract then overwrite prior data and save new.

Code: Select all

TAG POS=1 TYPE=TD ATTR=ID:lowLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:ctLP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:lowSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:hiSP EXTRACT=TXT
TAG POS=1 TYPE=SPAN ATTR=ID:ctSP EXTRACT=TXT
TAG POS=1 TYPE=TD ATTR=ID:avgDom EXTRACT=TXT
'Average LP
TAG POS=1 TYPE=TD ATTR=ID:avgLP EXTRACT=TXT
'Average SP
TAG POS=1 TYPE=TD ATTR=ID:avgSP EXTRACT=TXT
'Overwrite old data
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Chasedata.csv
Now what happens is new data is appended to prior. See attached output file.
Thanks
Yeah, but do you run your Script in iMB11 or FF47...?, and if FF, which Version of iMacros for FF are you using...?
=> Run it in both Browsers to mention if it (still) works in one...

You didn't post your whole Script so I cannot see if you are using '!ERRORIGNORE', try disabling it (with an existing 'Chasedata.csv' File in place) to see if you get any RuntimeError...

I use a same Mechanism in one of my Macros and it works perfectly. But I'm using some "older" Version of iMacros for FF (v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64).

No "output file" got attached to your Thread... (Needs to be zipped, Max 256Kb.)

Hum..., and you didn't follow up on / finish your previous Thread...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
azbob
Posts: 85
Joined: Mon Sep 21, 2009 6:16 pm

Re: FILEDELETE overwrite stopped (?) working

Post by azbob » Wed Aug 17, 2016 1:41 am

Imacros for FF 9.0.3
Hi,
Yeah still working on the previous thread...This happened today and in crunch to get work out.
Running under FF, imacros 9.0.3..
Using !ERRORIGNORE, so disabled and got this error:
"expected absolute paths are prohibited for security reason as parameter 1, line: 55 (Error code: -911)"
and Line 55 happens to be the filedelete:
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv
I ran in IMB11 and it wrote data on 1st line of .csv file, but it put #EANF# in each cell!

Sorry ..I added the prior zip file
Attachments
Chasedata.zip
(184 Bytes) Downloaded 350 times
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

Post by chivracq » Wed Aug 17, 2016 10:22 am

azbob wrote:Imacros for FF 9.0.3
Hi,
Yeah still working on the previous thread...This happened today and in crunch to get work out.
Running under FF, imacros 9.0.3..

Using !ERRORIGNORE, so disabled and got this error:
"expected absolute paths are prohibited for security reason as parameter 1, line: 55 (Error code: -911)"
and Line 55 happens to be the filedelete:

Code: Select all

FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Chasedata.csv
I ran in IMB11 and it wrote data on 1st line of .csv file, but it put #EANF# in each cell!

Sorry ..I added the prior zip file
Chasedata.csv:

Code: Select all

"$199,000 ","$2,500,000 ",290,"$200,000 ","$1,100,000 ",201,69,"$394,821 ","$341,891 "
Sounds like a Bug/Limitation by Design in v9.0.3 for FF then...

But I checked my own Macro and the "Mechanism" that I implemented is actually a tiny little bit different and might work as a Workaround for you, apart from downgrading to v8.9.7, as it doesn't need any Absolute Path for 'FILEDELETE'...:

Instead of issuing the 'SAVEAS' and the 'FILEDELETE' to the iMacros 'DataSources' Folder (which requires Absolute Path then for both) like you, I do it in the (Default) 'Downloads' Folder for which for both Commands you don't need to specify any Path, just the Name of the File will do, and it's for the '!DATASOURCE' Command (for your other Macro reusing the Data) that I have to use the Absolute Path...! Or in your other Macro, you can (temporarily) set the Default 'Datasources' Folder to the 'Downloads' Folder using '!FOLDER_DATASOURCE'... :idea:

You still didn't react/follow up on your previous Thread... :roll: (I will stop answering your Threads if you don't follow up neatly on all of them...)

>>>

EDIT [2021-01-11]:
"Instead of issuing the 'SAVEAS' and the 'FILEDELETE' to the iMacros 'Downloads' Folder..."
... => should read:
"Instead of issuing the 'SAVEAS' and the 'FILEDELETE' to the iMacros 'DataSources' Folder..."
(Corrected... :oops: )
Last edited by chivracq on Tue Jan 12, 2021 12:17 am, edited 2 times in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
azbob
Posts: 85
Joined: Mon Sep 21, 2009 6:16 pm

Re: FILEDELETE overwrite stopped (?) working

Post by azbob » Wed Aug 17, 2016 10:34 pm

Well there you have it..
Didn't want to mess with what worked. So I went back to V8.9.7.
I will be finishing up the other issue tomorrow and close out that post.
As it turns out it was affected by the absolute path issue as well.
Thanks for clearing this up.
Tom, Tech Support
Posts: 3834
Joined: Mon May 31, 2010 4:59 pm

Re: FILEDELETE overwrite stopped (?) working

Post by Tom, Tech Support » Thu Aug 18, 2016 11:06 am

Hi azbob,

Thank you for reporting the FILEDELETE issue here! I am not sure if this is a bug or a new limitation, but I have logged it for follow-up by the development team.
Regards,

Tom, iMacros Support
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

Post by chivracq » Fri Aug 19, 2016 1:02 am

azbob wrote:Well there you have it..
Didn't want to mess with what worked. So I went back to V8.9.7.
I will be finishing up the other issue tomorrow and close out that post.
As it turns out it was affected by the absolute path issue as well.
Thanks for clearing this up.
Oh yep, sorry about being so "pushy" about your previous Thread, I had misread/misunderstood your "Yeah still working on the previous thread...This happened today and in crunch to get work out."
Tom, Tech Support wrote:Hi azbob,

Thank you for reporting the FILEDELETE issue here! I am not sure if this is a bug or a new limitation, but I have logged it for follow-up by the development team.
Looks like a Bug to me, even if the (new) RuntimeError makes it believe it is a Limitation but it is then a very-very heavy (and rather useless) Limitation, or provide a (get/set) '!FOLDER_DOWNLOADS' Built-in Var...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
jcdeadend01
Posts: 2
Joined: Mon Aug 29, 2016 12:02 am

Re: FILEDELETE overwrite stopped (?) working

Post by jcdeadend01 » Mon Aug 29, 2016 12:19 am

The FILEDELETE macro stopped working recently in a macro I've been using for months.

Using Firefox as browser.
Using Windows XP SP3

I haven't made any changes to iMacros, the operating system, the browser or the macro itself.

Macro is...

VERSION BUILD=8970419 RECORDER=FX

'---------------------------------------------------------------------------
' Constants
'---------------------------------------------------------------------------
SET Folder C:\Instagram
SET BackSlash \
SET File Instagram-Extract-meekismurder.csv


'---------------------------------------------------------------------------
' Set up the files to hold the extracted information.
'---------------------------------------------------------------------------
SET ExtractFile {{Folder}}
ADD ExtractFile {{BackSlash}}
ADD ExtractFile {{File}}
FILEDELETE NAME={{ExtractFile}}

Any ideas what's causing the problem or a way to work around it ?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

Post by chivracq » Mon Aug 29, 2016 6:59 pm

jcdeadend01 wrote:The FILEDELETE macro stopped working recently in a macro I've been using for months.

Using

Code: Select all

Firefox as browser.
Windows XP SP3
I haven't made any changes to iMacros, the operating system, the browser or the macro itself.

Macro is...

Code: Select all

VERSION BUILD=8970419 RECORDER=FX

'---------------------------------------------------------------------------
' Constants
'---------------------------------------------------------------------------
SET Folder C:\Instagram
SET BackSlash \
SET File Instagram-Extract-meekismurder.csv


'---------------------------------------------------------------------------
' Set up the files to hold the extracted information.
'---------------------------------------------------------------------------
SET ExtractFile {{Folder}}
ADD ExtractFile {{BackSlash}}
ADD ExtractFile {{File}}
FILEDELETE NAME={{ExtractFile}}
Any ideas what's causing the problem or a way to work around it ?
FCIM...! :mrgreen: => Your FCI is a bit unclear...:
iMacros for FF v8.9.7 or v9.0.3...?, FF47/48...?, WinXP SP3.

You say "I haven't made any changes to iMacros, the operating system, the browser or the macro itself.", but I reckon iMacros updated itself to v9.0.3 for which the Behaviour for 'FILEDELETE' changed, like you can read from the previous Posts in this Thread.
'FILEDELETE' now (in v9.0.3) only works for the Default 'Downloads' Folder and I reckon your 'C:\Instagram' Folder is not your Default (iMacros) 'Downloads' Folder...
Or you revert to v8.9.7 and make sure to disable the Automatic Updates for iMacros...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
jcdeadend01
Posts: 2
Joined: Mon Aug 29, 2016 12:02 am

Re: FILEDELETE overwrite stopped (?) working

Post by jcdeadend01 » Tue Aug 30, 2016 2:13 am

Thanks for the prompt reply.

The macro that was failing gets run automatically by the job scheduler so the version of iMacros I have could have gotten updated without me knowing (if that's how it's done).

Is it normal to introduce a change to how a command works without advance warning ? I had no idea what was going wrong for a day or two.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: FILEDELETE overwrite stopped (?) working

Post by chivracq » Tue Aug 30, 2016 2:49 am

jcdeadend01 wrote:Thanks for the prompt reply.

The macro that was failing gets run automatically by the job scheduler so the version of iMacros I have could have gotten updated without me knowing (if that's how it's done).

Is it normal to introduce a change to how a command works without advance warning ? I had no idea what was going wrong for a day or two.
Tja...!, you must know if you have disabled Automatic Updates for iMacros + Browser + OS and they should be disabled if you rely on running your Macro(s) from the Task Scheduler as any (Automatic) Update can break stg...
Checking your Config is the first thing to do in case of a Pb..., and you didn't answer my Qt about your exact FCI... :roll:

And about "normal" or not, you don't sound like you read the previous Posts in this Thread... TechSupport said they were (going to) investigate/ing if it's a Bug or a Limitation, meaning they didn't even know about it, and that's the Purpose of the Forum, Users reporting Bugs/Pb's etc..., especially when a new Version is deployed.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply