Filedelete not working in IMB V12

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Filedelete not working in IMB V12

by azbob on Thu Sep 07, 2017 3:55 pm

Configuration: Win 10, Firefox 55.0.3, iMacros Standard Edition (x86) V12.0.0.501.2305
Hi,

Upgraded from IMacros V11.0.246.4051,FF Firefox 53

1) This code worked fine with IMacros V11.0.246.4051 to overwrite previous file entries:
Code: Select all
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\CMATaxdata\Taxdata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\CMATaxdata FILE=Taxdata.csv


Now with v12 and FF 55.0.3 it doesn't overwrite previous extract rather appends to prior extract.

2) When no anchor Extract is returning null instead of #EANF#

Are these FF 55 problems or v12?

Thanks
Last edited by azbob on Thu Sep 07, 2017 4:50 pm, edited 1 time in total.
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: Filedelete not working

by chivracq on Thu Sep 07, 2017 4:16 pm

azbob wrote:Configuration:
Code: Select all
Win 10, Firefox 55.0.3, iMacros Standard Edition (x86) V12.0.0.501.2305

Hi,

Upgraded from
Code: Select all
IMacros V11.0.246.4051,FF Firefox 53


1) This code worked fine with IMacros V11.0.246.4051 to overwrite previous file entries:
Code: Select all
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\CMATaxdata\Taxdata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\CMATaxdata FILE=Taxdata.csv


Now with v12 and FF 55.0.3 it doesn't overwrite previous extract rather appends to prior extract.

2) When no anchor Extract is returning null instead of #EANF#

Are these FF 55 problems or v12?

Thanks

Same 2 Behaviours in iMacros for FF v9.0.3, is by Choice/Design for 'FILEDELETE', you can now only delete Files located in the iMacros 'Downloads' Folder, Okay..., I can understand it, you'll have to adapt your Script to cope with it...
If you reuse the same '.CSV' as the DataSource for this same or some other Script, '!DATASOURCE' doesn't have the same Limitation luckily...
And you have a few other Workarounds as well, you can now in iMB v11.5/v12 from your Script temporarily set all iMacros 'DataSources' / 'Downloads' / etc Folders with a few new Built-in Vars implemented from iMB v11.5, I think... :idea:
Wiki - Built-in Vars wrote:iMacros Browser IE Plug-in Firefox !FOLDER_DATASOURCE
iMacros Browser IE Plug-in !FOLDER_DOWNLOAD
iMacros Browser IE Plug-in !FOLDER_LOG
iMacros Browser IE Plug-in !FOLDER_MACROS


Concerning 'EXTRACT' and 'Null' / '#EANF#', it's by (bad, ah-ah...! :roll: ) Design as well, and you can "play" with it with '!ERRORIGNORE' I think, but I've "demonstrated" in some other Thread that it's been not completely "correctly" implemented, and I consider it a full Bug in its current Implementation... :roll:

I don't remember exactly why and I'm too lazy/busy right now to search for the related Thread(s) (I think it's more than one), but there is stg else related to 'EXTRACT' returning '#EANF#' when_not_found, but that gets completely broken... (There is some other Functionality in iMacros (at least in iMacros for FF which is the only one I use, but I guess it's the same for all other "Flavours") that relies on 'EXTRACT' returning '#EANF#' if_not_found but Dev didn't think about it, Spanking deserved, ah-ah...! :twisted: )
Thread(s) is/are probably already about 1 year old, pity TechSup/Dev didn't follow up on that/those one(s) and still implemented the same Behaviour in iMB v12, I would say...! :roll:
Oh yeah, the Columns Structure of the '.CSV' File for the 'SAVEAS' gets completely screwed (as well) because of that, but I think there was stg else as well... landing you into some "Chicken and Egg" / "Catch 22" Loophole...!

:idea: And hum, @azbob, if you want to attract a bit TechSup/Dev's Attention, you should modify your Thread Title to "Filedelete not working in iMB v12" for example to include the Mention to 'iMB v12'... iMB v12 has just been released, I reckon they must be checking the Forum a little bit...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Filedelete not working in IMB V12

by chivracq on Thu Sep 07, 2017 4:58 pm

I notice you've edited your Thread Title already, I still modified my previous Post to add a few things, in case you missed that...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Filedelete not working in IMB V12

by azbob on Thu Sep 07, 2017 5:17 pm

So you mean doing adding a folder named "CMATaxdata" that contains Taxdata.csv file in my imacros downloads folder and changing code to this?

Code: Select all
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\downloads\CMATaxdata\Taxdata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\downloads\CMATaxdata FILE=Taxdata.csv


Looked at the links but was unsure how the variables would work in my use as I have multiple csv files that are used for holding extracted data. Taxdata.csv, CMAdata.csv, address.csv etc.. spread in 3 folders, that all use the filedelete than saveas scenario.

Any ideas how I would use/benefit from the !FOLDER_DOWNLOAD in that those instances?
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: Filedelete not working in IMB V12

by azbob on Thu Sep 07, 2017 5:24 pm

I notice you've edited your Thread Title already, I still modified my previous Post to add a few things, in case you missed that...

Not sure if I missed.

So I changed my extract return check to this just in case.

Code: Select all
if (frame_valid !== "#EANF#" && frame_valid !== null)


What do you think? Will that cover all bases for an "anchor not found" scenario or should I check for something in addition??
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: Filedelete not working in IMB V12

by chivracq on Thu Sep 07, 2017 5:55 pm

azbob wrote:So you mean doing adding a folder named "CMATaxdata" that contains Taxdata.csv file in my imacros downloads folder and changing code to this?

Code: Select all
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\downloads\CMATaxdata\Taxdata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\downloads\CMATaxdata FILE=Taxdata.csv


Looked at the links but was unsure how the variables would work in my use as I have multiple csv files that are used for holding extracted data. Taxdata.csv, CMAdata.csv, address.csv etc.. spread in 3 folders, that all use the filedelete than saveas scenario.

Any ideas how I would use/benefit from the !FOLDER_DOWNLOAD in that those instances?

Yeah, I would think in your Case especially if you already have some Folder Structure already set up with several Folders is simply to use '!FOLDER_DOWNLOAD' together with your original Script by simply adding the following Line just before the 'FILEDELETE':
Code: Select all
SET !FOLDER_DOWNLOAD C:\Users\Public\Documents\iMacros\datasources\CMATaxdata\
'FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\CMATaxdata\Taxdata.csv
FILEDELETE NAME=Taxdata.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\CMATaxdata FILE=Taxdata.csv

I never installed/used iMB so I've never tested it but it doesn't sound very difficult to test/try by yourself, I would think...

azbob wrote:
I notice you've edited your Thread Title already, I still modified my previous Post to add a few things, in case you missed that...

Not sure if I missed.

So I changed my extract return check to this just in case.
Code: Select all
if (frame_valid !== "#EANF#" && frame_valid !== null)

What do you think? Will that cover all bases for an "anchor not found" scenario or should I check for something in addition??

Difficult to answer based only on one Line, dunno really, I don't know what you are extracting exactly before... :roll:
But try playing with '!ERRORIGNORE', you still get the '#EANF#' I think, if '!ERRORIGNORE' is deactivated before an 'EXTRACT'... :idea:

I'm not sure if the Return Value for 'EXTRACT' is "really" 'Null' or 'null' or maybe an empty String (''), you need to check yourself with 'EVAL()' + 'PROMPT' in '.iim' or with 'alert()' in '.js' what the exact Return Value is and how to still evaluate it...
I cannot test for you, as I never installed iMB, and I don't do any '.js' Scripts either, ah-ah...!
Well, I never installed v9.0.3 for FF either, re-ah-ah...! (was waaaay too buggy from Day_1, so I never bothered installing it, and hum, I hope iMB v12 is not going the same way, ah-ah...!), or only on FF57 Nightly very recently, but it doesn't work at all, impossible to run any '.iim'/'.js' Script... (Hum..., and this will probably come as a big-big Surprise to Dev when FF57 will then be the "current" FF Version in a few weeks, I am afraid, oops...!)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Filedelete not working in IMB V12

by azbob on Thu Sep 07, 2017 6:33 pm

Well I did test.

1) PROMPT EXTRACT<SP>_{{!EXTRACT}}_
Returns: EXTRACT __

2) SET !EXTRACT_TEST_POPUP YES
RETURNS "NULL" on the first extract and each on after it does nothing, by that I mean no Extract window pops up!

3) So I tried checking for a "blank" first but it didn't work.
So I switched to null and conditional worked.

Well sounds like FF is not the browser to work in. What would you suggest that would be more stable to run imacros, imacro js scripts?
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: Filedelete not working in IMB V12

by chivracq on Thu Sep 07, 2017 7:27 pm

azbob wrote:Well I did test.

1) PROMPT EXTRACT<SP>_{{!EXTRACT}}_
Returns: EXTRACT __

2) SET !EXTRACT_TEST_POPUP YES
RETURNS "NULL" on the first extract and each on after it does nothing, by that I mean no Extract window pops up!

3) So I tried checking for a "blank" first but it didn't work.
So I switched to null and conditional worked.

Well sounds like FF is not the browser to work in. What would you suggest that would be more stable to run imacros, imacro js scripts?

Hum..., interesting that "NULL", then yep, I would think if you know what the 'EXTRACT' Command returns, then you can always check on that Return Value... Even if hum..., everybody was happy before with '#EANF#', I don't understand why that Behaviour changed, un-announced, not documented anywhere, and again, it is Buggy somewhere because it breaks some other Command/Functionality, I still haven't remembered which one...

Well, iMacros for FF is still the best Flavour of iMacros for me, not v9.0.3 of course, but v8.9.7 is very stable and still works on FF v55.0.3 which is the current FF Version, except for some mini-Bug since FF53 I think, that I seem to be the only one to hit (related to 'FILTER'), no big deal...
And otherwise, for my own "personal" Prod-Env, I still use iMacros for FF v8.8.2, ah-ah...! (+ Pale Moon v26.3.3 (=FF47), on Win10-x64.)

Absolutely all iMacros Versions since v8.8.2 (on FF29 at that time I think) have all been Versions to fix some Functionality in iMacros getting broken by FF since FF29 when Mozilla decided at that time to run a stupid Race about Version Numbers with Google/Chrome... Absolutely no new Functionality has been added to iMacros for FF since, I think..., hum, on the contrary actually, oops...
And even if any new Functionality would get implemented into iMacros for FF, I would really check-check-check before upgrading, and if I really like that new Functionality, but the new Version breaks too many things, I would be able to incorporate it myself into "my" v8.8.2 favorite stable Version, ah-ah...! (I already run my own customized Version of iMacros for FF, oops...! :twisted: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Filedelete not working in IMB V12

by azbob on Thu Sep 07, 2017 7:37 pm

Here is thethe new code i used
Code: Select all
'
'**********STORE SUBJECT ADDRESS IN CSV FILE SO FOLLOWINg MACROS CAN ACCESS**********************
SET !EXTRACT NULL
ADD !EXTRACT {{Sub_address}}
ADD !EXTRACT {{Sub_city}}
ADD !EXTRACT {{Sub_zip}}
'
SET !FOLDER_DOWNLOAD C:\Users\Public\Documents\iMacros\datasources\BBformdata\
FILEDELETE NAME=Address.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Address.csv


Ran this three times: Sorry I might have uploaded multiple files. last csv file shows results.

1) First run: SAVEAS places new extract data in row 2 not 1 and So I now have problem when I access.

2) runs two and three data appended so filedelete has no effect.

I no I can workaround the wrong line issue, but not overwriting previous extracts is problem I'm not sure how to solve.

Code: Select all
SET !DATASOURCE_LINE 2

Should I go back to v11??
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: Filedelete not working in IMB V12

by chivracq on Thu Sep 07, 2017 8:31 pm

azbob wrote:Here is thethe new code i used
Code: Select all
'
'**********STORE SUBJECT ADDRESS IN CSV FILE SO FOLLOWINg MACROS CAN ACCESS**********************
SET !EXTRACT NULL
ADD !EXTRACT {{Sub_address}}
ADD !EXTRACT {{Sub_city}}
ADD !EXTRACT {{Sub_zip}}
'
SET !FOLDER_DOWNLOAD C:\Users\Public\Documents\iMacros\datasources\BBformdata\
FILEDELETE NAME=Address.csv
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Address.csv


Ran this three times: Sorry I might have uploaded multiple files. last csv file shows results.

1) First run: SAVEAS places new extract data in row 2 not 1 and So I now have problem when I access.

2) runs two and three data appended so filedelete has no effect.

I no I can workaround the wrong line issue, but not overwriting previous extracts is problem I'm not sure how to solve.

Code: Select all
SET !DATASOURCE_LINE 2

Should I go back to v11??

Again, I cannot test for you as I don't have iMB (any Version)...
You can try adding some mini-'WAIT' Statement between the 'FILEDELETE' and the 'SAVEAS' I would think, I find it a bit "dangerous" to have them both so consecutive, I'm nearly surprised you never had any Pb before in iMB v11.5, I use both Commands as well myself for the same Delete/Save Mechanism, but I would have never dared to place both Statements so close, ah-ah...!, except for testing/checking that it would go wrong indeed, ah-ah...!
And you can use the 'PAUSE' Command to check if the File gets deleted or not...

Hum, btw, you can reduce those 2 Lines:
Code: Select all
SET !EXTRACT NULL
ADD !EXTRACT {{Sub_address}}

... to only 1:
Code: Select all
SET !EXTRACT {{Sub_address}}

It's "bad Practice" in my Opinion to start using 'ADD' directly on a Var before using 'SET' first, it only works on '!EXTRACT' I think, you get "unexpected" Results/Errors with (all) other Vars I think...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Filedelete not working in IMB V12

by azbob on Thu Sep 07, 2017 10:50 pm

Tried with :
Code: Select all
'**********STORE SUBJECT ADDRESS IN CSV FILE SO FOLLOWINg MACROS CAN ACCESS**********************
SET !EXTRACT {{Sub_address}}
ADD !EXTRACT {{Sub_city}}
ADD !EXTRACT {{Sub_zip}}
'
SET !FOLDER_DOWNLOAD C:\Users\Public\Documents\iMacros\datasources\BBformdata\
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Address.csv
'FILEDELETE NAME=C:\Users\Public\Documents\iMacros\downloads\Address\Address.csv
WAIT SECONDS=10
PAUSE
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Address.csv
'SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\downloads\Address FILE=Address.csv
PAUSE

Results are that the FILDELETE is not working!
I am done messing around with this and I am going back to V11 tomorrow.
Thanks for your help
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: Filedelete not working in IMB V12

by chivracq on Fri Sep 08, 2017 5:37 am

azbob wrote:Tried with :
Code: Select all
'**********STORE SUBJECT ADDRESS IN CSV FILE SO FOLLOWINg MACROS CAN ACCESS**********************
SET !EXTRACT {{Sub_address}}
ADD !EXTRACT {{Sub_city}}
ADD !EXTRACT {{Sub_zip}}
'
SET !FOLDER_DOWNLOAD C:\Users\Public\Documents\iMacros\datasources\BBformdata\
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Address.csv
'FILEDELETE NAME=C:\Users\Public\Documents\iMacros\downloads\Address\Address.csv
WAIT SECONDS=10
PAUSE
SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\datasources\BBformdata FILE=Address.csv
'SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Public\Documents\iMacros\downloads\Address FILE=Address.csv
PAUSE

Results are that the FILDELETE is not working!
I am done messing around with this and I am going back to V11 tomorrow.
Thanks for your help

Then I don't know, I cannot test for you, it's possible that '!FOLDER_DOWNLOAD' and/or 'FILEDELETE' is buggy... It's not difficult to test, all those Commands return some specific RuntimeErrors if anything goes "wrong" (without using '!ERRORIGNORE' of course) like I explained in this Thread:
- Re: Identifying iMacros Version
And 1 Sec is more than enough, 0.2 Sec would already be enough, for the mini-'WAIT' Statement(s)... (I would have put one as well between the 'SET !FOLDER' and the 'FILEDELETE'...)

I guess other Users will confirm if there is indeed really a Bug with 'FILEDELETE' and/or '!FOLDER_DOWNLOAD'... But '!FOLDER_DOWNLOAD' has been around since iMB v11.5 I think, and nobody ever reported any Pb with this Command, so I guess it must be working correctly...
The only Bug for me at this moment is that this Change in Behaviour in v9.0.3 for FF and now probably in iMB v12 is not documented anywhere and the Wiki still mentions happily:
Example:
Code: Select all
FILEDELETE NAME=c:\output\mydata.csv
This page was last modified on 23 November 2010, at 23:30.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Filedelete not working in IMB V12

by azbob on Fri Sep 08, 2017 10:57 am

Okay I ran:
Code: Select all
VERSION BUILD=11.0.246.4051
'VERSION BUILD=12.0.501.2305
SET !ERRORIGNORE NO
SET !EXTRACT_TEST_POPUP NO
SET !FOLDER_DOWNLOAD C:\BBformdata\
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Address.csv


Got this:
Unsupported variable !FOLDER_DOWNLOAD, line: 4 (Error code: -911) Bad parameter

Wiki - Built-in Vars wrote:
!FOLDER_DOWNLOAD"
SET !FOLDER_DOWNLOAD c:\my<SP>download<SP>folder\


I can't figure out what is "BAD"?
Any ideas??
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Re: Filedelete not working in IMB V12

by chivracq on Fri Sep 08, 2017 4:45 pm

azbob wrote:Okay I ran:
Code: Select all
VERSION BUILD=11.0.246.4051
'VERSION BUILD=12.0.501.2305
SET !ERRORIGNORE NO
SET !EXTRACT_TEST_POPUP NO
SET !FOLDER_DOWNLOAD C:\BBformdata\
FILEDELETE NAME=C:\Users\Public\Documents\iMacros\datasources\BBformdata\Address.csv


Got this:
Unsupported variable !FOLDER_DOWNLOAD, line: 4 (Error code: -911) Bad parameter

Wiki - Built-in Vars wrote:
!FOLDER_DOWNLOAD"
SET !FOLDER_DOWNLOAD c:\my<SP>download<SP>folder\


I can't figure out what is "BAD"?
Any ideas??

Yeah but '!FOLDER_DOWNLOAD' got implemented in iMB v11.5 I think..., I see a v11.0 in your mini-Script... :?
In what Version did you run your Script...?
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6489
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Filedelete not working in IMB V12

by azbob on Fri Sep 08, 2017 5:33 pm

That was in V12.
I had work to do so I went back to V11.0.246.4051 where it had worked and wham Filedelete was throwing "absolute path error".

So i ended up:
1) Placing all .csv files in iMacros\downloads folder instead of iMacros\datasources
2) Using this code to Extract:
Code: Select all
FILEDELETE NAME=Address.csv
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Address.csv


Then this for input files :
Code: Select all
SET !DATASOURCE C:\Users\Public\Documents\iMacros\downloads\Address.csv

All is good now filedelete works and
After I finish my work, I will reload V12 and try the above and let you know.
azbob
 
Posts: 76
Joined: Mon Sep 21, 2009 11:16 am

Next

Return to General Support & Discussions

Who is online

Users browsing this forum: Google [Bot] and 6 guests

-->