Page 1 of 3

%temp% going to temp folder?

Posted: 18 Sep 2006 13:59
by itsme28m
Hi,

When you go to start, run, and then type in %temp%, you go directly to the temp folder, but it seems this is not possible in xyplorer. Am i missing something or is this just not possible in xyplorer?

Posted: 19 Sep 2006 07:59
by ugus
AFAIK it is not possible to use these in XY.
Support for environment variables would be a nice addition

/Ulrik

Re: %temp% going to temp folder?

Posted: 19 Sep 2006 10:01
by admin
itsme28m wrote:Hi,

When you go to start, run, and then type in %temp%, you go directly to the temp folder, but it seems this is not possible in xyplorer. Am i missing something or is this just not possible in xyplorer?
You have a list of those things handy?

Re: %temp% going to temp folder?

Posted: 19 Sep 2006 11:09
by ugus
admin wrote:
itsme28m wrote:Hi,

When you go to start, run, and then type in %temp%, you go directly to the temp folder, but it seems this is not possible in xyplorer. Am i missing something or is this just not possible in xyplorer?
You have a list of those things handy?
http://en.wikipedia.org/wiki/Environment_variable ??

/Ulrik

Re: %temp% going to temp folder?

Posted: 19 Sep 2006 11:28
by admin
ugus wrote:
admin wrote:
itsme28m wrote:Hi,

When you go to start, run, and then type in %temp%, you go directly to the temp folder, but it seems this is not possible in xyplorer. Am i missing something or is this just not possible in xyplorer?
You have a list of those things handy?
http://en.wikipedia.org/wiki/Environment_variable ??

/Ulrik
Thanks, that will be a nice enhancement to portability! :D

Re: %temp% going to temp folder?

Posted: 19 Sep 2006 13:29
by allen
admin wrote:
Thanks, that will be a nice enhancement to portability! :D
I was just thinking of this/these the other day, definitely a great enhancement to portability.

Re: %temp% going to temp folder?

Posted: 19 Sep 2006 13:52
by admin
allen wrote:
admin wrote:
Thanks, that will be a nice enhancement to portability! :D
I was just thinking of this/these the other day, definitely a great enhancement to portability.
I found these environment variables pointing to paths:
%allusersprofile%
%appdata%
%commonprogramfiles%
%programfiles%
%systemdrive%
%systemroot%
%temp%
%tmp%
%userprofile% (ADDED)
%windir%
Anything missing?

Of course, we could get crazy and add own stuff to the list... like
%xyapp%
%xythumbscache%
and what not.

Re: %temp% going to temp folder?

Posted: 19 Sep 2006 15:20
by ugus
admin wrote:
allen wrote:
admin wrote:
Thanks, that will be a nice enhancement to portability! :D
I was just thinking of this/these the other day, definitely a great enhancement to portability.
I found these environment variables pointing to paths:
%allusersprofile%
%appdata%
%commonprogramfiles%
%programfiles%
%systemdrive%
%systemroot%
%temp%
%tmp%
%userprofile% (ADDED)
%windir%
Anything missing?

Of course, we could get crazy and add own stuff to the list... like
%xyapp%
%xythumbscache%
and what not.
This would be great! I was accustomed to use these as shortcuts using the run-box (before I ever knew about XY) for fast navigation in Explorer.

Missing:

%HOMEDRIVE%
%HOMEPATH%
%HOMESHARE%

Honestly I don't know the exact difference between these ones. :(

Maybe you can add more some stuff not covered by
the standard environment variables, following the special folders syntax:

I.E.

%PERSONAL%
etc...

and!! letting the user being able to define own paths :) thereby making some kind of favorites reachable from addressbar, searches etc 8)

Hmmm...

Why not make make a third field in catalog | properties named
variable name or something....

E.g.

Caption: My folder

Destination: C:\Test\Foo

Variable name: %MYFOLDER%

Maybe this should only work with standard file/folder paths not
VF:s etc. or???



/Ulrik

Posted: 19 Sep 2006 15:30
by ugus
OK after some thoughts of it...maybe some of the need for userdefined paths are covered by the plans using aliases in adressbar? or?

/Ulrik

Posted: 19 Sep 2006 16:04
by allen
For an excellent example of implementing custom env. variables, you should check out EditPad Pro. Used primarily for configuring the ability to launch files in external applications, it has variables that allow you to step backwards ~n number of directories (short hand relative paths, more or less)

I'm pasting them in below -- naturally, not all of them pertain to xy as EditPad deals with files not folders -- but some of the folder options might prove handy. Not so much now, but in the scripting features you've hinted at being in development.

Code: Select all

%FILE% The entire path plus filename to the file
%FILENAME% The file name without path
%FILENAMENOEXT% The file name without the extension
%FILENAMENODOT% The file name cut off at the first dot
%FILEEXT% The extension of the file name without the dot
%FILELONGEXT% Everything in the file name after the first dot
%PATH% The full path without trailing delimiter to the file
%DRIVE% The drive the file is on, without trailing delimiter
%FOLDER% The full path without the drive and without leading or trailing delimiters
%FOLDER1% First folder in the path
%FOLDER2% Second folder in the path
%FOLDER99%  99th folder in the path.
%FOLDER<1% Last folder in the path
%FOLDER<2% Second folder from the end in the path
%FOLDER<99% 99th folder from the end in the path.
%PATH1% First folder in the path, without delimiters
%PATH2% First two folders in the path, without leading or trailing delimiters
%PATH99% First 99 folders in the path, without leading or trailing delimiters
%PATH<1%  Last folder in the path, without delimiters
%PATH<2% Last two folders in the path, without leading or trailing delimiters
%PATH<99% Last 99 folders in the path, without leading or trailing delimiters
%PATH-1% Path without the drive or the first folder
%PATH-2% Path without the drive or the first two folders
%PATH-99% Path without the drive or the first 99 folders.
%PATH<-1% Path without the drive or the last folder
%PATH<-2% Path without the drive or the last two folders
%PATH<-99% Path without the drive or the last 99 folders.

Posted: 19 Sep 2006 17:20
by RalphM
Following this thread for a while, I really started wondering if you shouldn't actually leave the management of system variables to the system and just replace any path entered in the form of "%xxx%" with the respective path that's stored in the variable.
In case it's not valid you could use the "not available" message we already know from tabs that point to destinations currently not available.

Posted: 19 Sep 2006 18:02
by admin
RalphM wrote:Following this thread for a while, I really started wondering if you shouldn't actually leave the management of system variables to the system and just replace any path entered in the form of "%xxx%" with the respective path that's stored in the variable.
In case it's not valid you could use the "not available" message we already know from tabs that point to destinations currently not available.
Which is exactly what I have done in the meantime. The nice thing about the %_%-syntax is that it is pretty foolproof for simple replacement operations. So in the next version you can state "%tmp%?*.txt" and so on. I will just squeeze every location string through a little environment-variable-replacer-routine. Folks that call their folders "%temp%" then have the problems they deserve :wink:

Posted: 19 Sep 2006 18:07
by admin
ugus wrote:OK after some thoughts of it...maybe some of the need for userdefined paths are covered by the plans using aliases in adressbar? or?
Yes, I'd think so, too. Only that aliases, at least as they are currently planned ("@alias" - no suffix @), cannot be part of term but only stand for a whole term. I don't know if it would be worth the pain to allow things like "@blah@?*.txt" where "@blah@" then would be replaced by the data field of the matching catalog item. A touch too much, or?

Posted: 19 Sep 2006 18:14
by ugus
admin wrote:
RalphM wrote:Following this thread for a while, I really started wondering if you shouldn't actually leave the management of system variables to the system and just replace any path entered in the form of "%xxx%" with the respective path that's stored in the variable.
In case it's not valid you could use the "not available" message we already know from tabs that point to destinations currently not available.
Which is exactly what I have done in the meantime. The nice thing about the %_%-syntax is that it is pretty foolproof for simple replacement operations. So in the next version you can state "%tmp%?*.txt" and so on. I will just squeeze every location string through a little environment-variable-replacer-routine. Folks that call their folders "%temp%" then have the problems they deserve :wink:
Watching this thread with increasing curiosity... just wonder if you have
extended the "system variables" with some of the special folder locations
like for example %Personal% %UserDocs% or whatever you may call it ;-)

/Ulrik

Posted: 19 Sep 2006 18:22
by ugus
admin wrote:
ugus wrote:OK after some thoughts of it...maybe some of the need for userdefined paths are covered by the plans using aliases in adressbar? or?
Yes, I'd think so, too. Only that aliases, at least as they are currently planned ("@alias" - no suffix @), cannot be part of term but only stand for a whole term. I don't know if it would be worth the pain to allow things like "@blah@?*.txt" where "@blah@" then would be replaced by the data field of the matching catalog item. A touch too much, or?
Yes - I think.

I think its enough with these "system variables" because the aliases cover perfectly the need for "shortcuts" to user-defined items.

/Ulrik