Skip to content

write_file current dir

This works:

post data=%file-./_directory/test.xml%

This does not:
write file="./_directory/file.txt" "%targeturl%\n"

Comments

  • SvenSven www.GSA-Online.de
    ./ is unix syntax... you probably mean .\ ... I am correcting that in some macros but not all.
  • I tried with .\ and it is not working. The unix syntax is fine i never had any problems in programming or so using "./" in windows.
  • SvenSven www.GSA-Online.de
    I will fix/replace that on next update as well.
  • andrzejekandrzejek Polska
    edited July 2019
    not working, ser opened as ADMIN
  • SvenSven www.GSA-Online.de
    edited July 2019
    ok but does _directory exists in the c:\users\<login>\appdata\roaming\gsa search engine ranker\ folder? Because thats the default one.
  • hmmm if thats default for write file it does not work

    write file="./x.txt" "%y%|%url_target%|\n"

    .. can we change the default folder? i want to keep them in the engines folder to have all in sync
  • SvenSven www.GSA-Online.de
    you can add the \engine\ in path
  • andrzejekandrzejek Polska
    edited July 2019
    can you show full example? i guess u mean full path to the engines foldeR?
  • SvenSven www.GSA-Online.de
    either that or just

    write_file ".\engines\blah.txt" "content"
  • andrzejekandrzejek Polska
    edited July 2019
    I meant Engines folder where SER takes engine.ini ^^ but w/e thanks i figured it out 
  • SvenSven www.GSA-Online.de
    that is only accessible by admin right so better not write there at all...but the appdata folder can also hold engine files.
  • andrzejekandrzejek Polska
    edited July 2019
    Oh i didnt know that, but what folder have priority then?

    Edit: there are 2 engines visible (both from app and program files)
  • SvenSven www.GSA-Online.de
    the one in installation folder is default.
  • Can we change the default so SER updates wont override anything?
  • SvenSven www.GSA-Online.de
    it should always append it!?
  • append it where?
  • SvenSven www.GSA-Online.de
    to the end of the same file name
  • I am talking about engines mostly, for ex. if i delete some built-in engines i would like to keep that after update.
  • SvenSven www.GSA-Online.de
    you better put in that "enabled=0" ... that way it is not overwritten as the engine itself is newer than the one in setup.
  • What is the best way to handle modified built in engines (so they wont be overriden by updates) ?
  • SvenSven www.GSA-Online.de
    put them in the appdata-folder\engines
  • Yes, but then there are 2 engines visible in Project Settings, one from appdata and one from programfiles. 
  • SvenSven www.GSA-Online.de
    fixed in next update
  • What is the currect behaviour ?
  • SvenSven www.GSA-Online.de
    as the update is out, it is now taking the appdata engine first and then the one in installation folder (if not dupe).
  • What does it mean, "if not dupe" its not clear.
  • SvenSven www.GSA-Online.de
    if you have the same file name in both folders, it is using the one in appdir and skips the one from original folder.
Sign In or Register to comment.