Page 2 of 2

Re: Scripting: adjust inconsistent path parsing

Posted: 29 Jan 2019 20:09
by admin
SammaySarkar wrote: 29 Jan 2019 11:10
  • savethumb() does not support relative paths. Plans to support?
  • columnlayout(), loadlayout(), paperfolder() partially accepts relative paths in that they can prepend <xydata>\(columns|layouts|paper), but breaks with .\ and ..\. Do you think these should also correctly support dotted relative paths, being relative to their function-specific base locations?
    so for example, columnlayout("..\..\xydata.bak\columns\defaultcolumns.txt") will work, (load columns from a backup profile directory by pathfinding to parent folders of <xydata>\columns)
savethumb(): Yes, coming...

columnlayout(), loadlayout(), paperfolder() : that were 3 bugs :bug: :bug: :bug: . Fix comes.

Re: Scripting: adjust inconsistent path parsing

Posted: 30 Jan 2019 10:40
by bdeshi
admin wrote: 29 Jan 2019 19:13
SammaySarkar wrote: 29 Jan 2019 11:10 catalogload also does not support dotted relative paths. This is more confusing because for example, catalogload("..\..\catalog.dat") fails, but the error message has the correct path!

Code: Select all

Not Found
-----------------------------------
Could not find: 

D:\tools\XYplorer\catalog.dat      (note: this file exists in this exact path.)
so the error supports relative paths better than the command itself! :ghost:
1) Cannot confirm.

2) The help says: "Can be relative to the application data folder." So I cannot change anything here.
Got it: "Can be relative to the application data <xycatalogs> folder."

Code: Select all

-- folders -------------------------
parent\xydata\catalogs\catalog.dat
parent\xydata\xydata-catalog.dat
parent\parent-catalog.dat
-- code ----------------------------
catalogload "catalog.dat"; // <xycatalogs>\catalog.dat == parent\xydata\catalogs\catalog.dat
catalogload ".\catalog.dat"; // <xycatalogs>\catalog.dat
catalogload "..\xydata-catalog.dat"; // <xycatalogs>\..\xydata-catalog.dat
catalogload "..\..\parent-catalog.dat"; // <xycatalogs>\..\..\parent-catalog.dat
This is okay; just change the text in the user manual.

Re: Scripting: adjust inconsistent path parsing

Posted: 30 Jan 2019 11:02
by admin
Ah! :oops: Thanks!

Re: Scripting: adjust inconsistent path parsing

Posted: 27 Nov 2021 21:02
by WirlyWirly
I'm currently trying to use a relative path in a PaperFolder .txt file, but haven't been able to get it to work. Have relative paths not been enabled for PaperFolders?

My paths are as follows...

Code: Select all

# <xypath>
A:\PortableApps\PortableApps\xyPlorer\xyplorer.exe

# Target file
A:\PortableApps\PortableApps\7-ZipPortable\7-ZipPortable.exe

# Line in PaperFolder.txt relative to <xypath>
<xypath>..\..\7-ZipPortable\7-ZipPortable.exe
I use this same relative path in a .xys file and it works great, so I'm assuming if PaperFolders supported relative paths then the syntax would be the same.

Re: Scripting: adjust inconsistent path parsing

Posted: 27 Nov 2021 21:18
by jupe
Below quote from the help file, you should check it out:
Help File, in fact the first sentence under Paper Folders heading wrote:Paper Folders are simple text files that contain the full paths to items, one per line.