Environment vaiables in portable file and folder use
Environment vaiables in portable file and folder use
I really like the "portable file associations" and "portable open with" abilities. There is one inconsistency that I would like for you to fix.
For a file I can use environment variables as shown here:
ini>%epPrgspc%
But for a folder I cannot use environment variables as shown here:
\>"%xnvPrgspc%
In either case I can enter exact paths or portable paths using "?".
I use environment variables extensively in both desktop and portable computers. It should be an easy thing for you to allow environment variables for both files and folders.
For a file I can use environment variables as shown here:
ini>%epPrgspc%
But for a folder I cannot use environment variables as shown here:
\>"%xnvPrgspc%
In either case I can enter exact paths or portable paths using "?".
I use environment variables extensively in both desktop and portable computers. It should be an easy thing for you to allow environment variables for both files and folders.
Re: Environment vaiables in portable file and folder use
I think you should show a bit more of your usage of the strings.
Especially in the second I see double quotes inside the string - but can't understand what it's about...
Especially in the second I see double quotes inside the string - but can't understand what it's about...
Win11 Pro 223H2 Gerrman
Re: Environment vaiables in portable file and folder use
The correct example is:
\>%xnvPrgspc%
I tried the directory portable syntax both without double quotes and with double quotes:
\>%xnvPrgspc%
\>"%xnvPrgspc%"
When I posted to the forum I failed to delete the first double quote.
The problem is simple. Portable file associations work with actual file path specified and with an environment variable that holds the actual file path.
Directory associations work only with an actual folder path but NOT with an environment variable that holds the actual folder path.
I am using XYplorer 13.40.0100
I think that both file and folder associations should work with both actual path stings and environment variables that hold the actual path strings.
\>%xnvPrgspc%
I tried the directory portable syntax both without double quotes and with double quotes:
\>%xnvPrgspc%
\>"%xnvPrgspc%"
When I posted to the forum I failed to delete the first double quote.
The problem is simple. Portable file associations work with actual file path specified and with an environment variable that holds the actual file path.
Directory associations work only with an actual folder path but NOT with an environment variable that holds the actual folder path.
I am using XYplorer 13.40.0100
I think that both file and folder associations should work with both actual path stings and environment variables that hold the actual path strings.
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Environment vaiables in portable file and folder use
Works fine here.
Here are my test definitions. Both work:
Here are my test definitions. Both work:
Code: Select all
"ACDC (Env Folders)" \>%ProgramFiles%\ACDSee32\ACDSee32.exe
"ACDC (Env)" jpg;png;gif>%ProgramFiles%\ACDSee32\ACDSee32.exe
FAQ | XY News RSS | XY Twitter
Re: Environment vaiables in portable file and folder use
How is the whole command line?Terry wrote:The correct example is:
\>%xnvPrgspc%
And maybe, to what points your %xnvPrgspc% ?
.
Re: Environment vaiables in portable file and folder use
Responding to admin: "works fine here"
I have done some more fiddling. The environment variable "xnvPrgspc" is 58 characters long which does not work. Things seem to work okay if I use shorter strings in an environment variable.
Further, if I use an environment variable that holds about 25 characters of the full path and then add literal characters to complete the path, then it works.
My guess is that your program limits the length of an environment variable that may be used.
I have not done a lot of fiddling/testing to see what is the maximum length that an environment variable may be.
In my situation, I use environment variables extensively, and I hope that we can get this issue figured out and/or fixed.
I have done some more fiddling. The environment variable "xnvPrgspc" is 58 characters long which does not work. Things seem to work okay if I use shorter strings in an environment variable.
Further, if I use an environment variable that holds about 25 characters of the full path and then add literal characters to complete the path, then it works.
My guess is that your program limits the length of an environment variable that may be used.
I have not done a lot of fiddling/testing to see what is the maximum length that an environment variable may be.
In my situation, I use environment variables extensively, and I hope that we can get this issue figured out and/or fixed.
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Environment vaiables in portable file and folder use
There is no such limit. I have longer ones and they work fine.
FAQ | XY News RSS | XY Twitter
Re: Environment vaiables in portable file and folder use
Could there be a problem with quoting if the path contains blanks?
Ralph
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Environment vaiables in portable file and folder use
OP says there is a difference between files and folders in PFA. Why should length or blanks play a role here?
FAQ | XY News RSS | XY Twitter
Re: Environment vaiables in portable file and folder use
Was just my 0.02 cents since we had some trouble with blanks in path names before, but you're right about his statement in OP.
Just the later addition that it works up to a certain length made me think about blanks.
Didn't mean to confuse anybody.
Just the later addition that it works up to a certain length made me think about blanks.
Didn't mean to confuse anybody.
Ralph
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Environment vaiables in portable file and folder use
No offense, I was just thinking aloud. It's a weird issue and "xnvPrgspc" is a weird variable.
FAQ | XY News RSS | XY Twitter
Re: Environment vaiables in portable file and folder use
Responding to admin (It's a weird issue and "xnvPrgspc" is a weird variable).
It is a custom variable. I use MANY such environment variables to coordinate various systems, users and so forth. I began programming in 1967 for the university system in my state in the U. S. Now to the current situation. Limiting discussion to a particular.
I define the the following two env variables (among many others):
portableappsDir=c:\portable\portableapps
xnvPrgspc=c:\portable\portableapps\xnviewPortable\xnviewPortable.exe
The attached image file ("Portable File Associations box") has 7 entries that show variations on using literals, environment variables, and combinations of the two. 4 of the 7 are recognized (that is work) and 3 of the 7 are NOT recognized (that is do NOT work).
Further information. Sometimes env variables work. I cannot find a reason for this strange behavior or find consistent behavior. That is why I suspect an elusive bug (problem) in the coding. I do not rule out that I am doing something dumb, but I cannot find out what. Perhaps with this specific information, you can determine if there is a screwy bug on prehaps alzeimers is setting in for an old man.
Terry
It is a custom variable. I use MANY such environment variables to coordinate various systems, users and so forth. I began programming in 1967 for the university system in my state in the U. S. Now to the current situation. Limiting discussion to a particular.
I define the the following two env variables (among many others):
portableappsDir=c:\portable\portableapps
xnvPrgspc=c:\portable\portableapps\xnviewPortable\xnviewPortable.exe
The attached image file ("Portable File Associations box") has 7 entries that show variations on using literals, environment variables, and combinations of the two. 4 of the 7 are recognized (that is work) and 3 of the 7 are NOT recognized (that is do NOT work).
Further information. Sometimes env variables work. I cannot find a reason for this strange behavior or find consistent behavior. That is why I suspect an elusive bug (problem) in the coding. I do not rule out that I am doing something dumb, but I cannot find out what. Perhaps with this specific information, you can determine if there is a screwy bug on prehaps alzeimers is setting in for an old man.
Terry
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Environment vaiables in portable file and folder use
When you click menu Help / Environment Variables, is %xnvPrgspc% listed there?
FAQ | XY News RSS | XY Twitter
Re: Environment vaiables in portable file and folder use
Response to Admin "When you click menu Help / Environment Variables, is %xnvPrgspc% listed there?"
No it is not.
But when I run (in a DOS command window) the command line "set xnv" it is there as shown in the following three lines copied from a dos window. The command line and the two lines response are copied and pasted, not typed, below.
The command line and the two line response.
set xnv
xnvPrgdir=c:\portable\portableapps\xnviewPortable
xnvPrgspc=c:\portable\portableapps\xnviewPortable\xnviewPortable.exe
Further, I use the environment variable in other programs (such as, Winbatch) and it works just fine. That is the xnviewportable.exe program runs. I have been using this env variable for years with multiple programs. They all work just fine. Only xyPlorer is having problems.
No it is not.
But when I run (in a DOS command window) the command line "set xnv" it is there as shown in the following three lines copied from a dos window. The command line and the two lines response are copied and pasted, not typed, below.
The command line and the two line response.
set xnv
xnvPrgdir=c:\portable\portableapps\xnviewPortable
xnvPrgspc=c:\portable\portableapps\xnviewPortable\xnviewPortable.exe
Further, I use the environment variable in other programs (such as, Winbatch) and it works just fine. That is the xnviewportable.exe program runs. I have been using this env variable for years with multiple programs. They all work just fine. Only xyPlorer is having problems.
-
- Site Admin
- Posts: 60612
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Environment vaiables in portable file and folder use
I might have fixed it. Please try the next beta version (upload soon).
FAQ | XY News RSS | XY Twitter