Help and Support
Ask a question, report a problem, request a feature...
<<  Back To Forum

Feature request: folder location, environmental variables

by Bennieboj on 2015/08/14 11:09:06 AM    
Hi,

I use Tixati portable inside my dropbox folder to use it on multiple pcs, mostly windows.
Basically I like Tixati portable because all my settings are on dropbox.
However the downside is that all my downloaded files are also occasionally getting synced on dropbox or I am unable to store them all on the same location on different pcs because the user names differ.

I think the usage of environmental variables solves this.
I would like to be able to set my download folder to: %USERPROFILE%\Desktop.
My incomplete pieces folder would be something outside dropbox like %TEMP%\tixati or something to prevent dropbox from sycing pieces.
Under UNIX systems I figure u can use the ~ sign for the home directory or something.

Thanks in advance!
by Radish on 2015/08/18 01:21:42 PM    
As you are thinking of using enviroment variables to deal with the issue you have you might find the following useful (See below.)

Perhaps you could adapt the information to SET environmental variables to suit your own situation. If you got it to work you would, of course, need to carefully test it all out for yourself.

If you did get it to work okay, or otherwise, it would be good if you could report back to this thread on how things went, mentioning what environment variables you set and what the result of your testing was.

====================================================================

I use a ram disk for %TEMP% and %TMP% files but I use it selectively on a per program basis using variations of the following batch file script (for example):

set TEMP=W:\TEMP
set TMP=W:\TMP
start "" "C:\Program Files (x86)\Microsoft Office\OFFICE11\OUTLOOK.EXE"
exit

The above would launch Microsoft Office Outlook and have it write its temporary files into the ramdisk (whereas normally they get written into the default %TEMP%).

set TEMP=W:\TEMP
set TMP=W:\TMP
start "" "E:\PORTABLES\INTERNET\PeerBlock\peerblock.exe"
ping -n 31 127.0.0.1 >NUL
start "" "E:\PORTABLES\INTERNET\uTorrent\uTorrent.exe"
exit

The above would launch PeerBlock, then after a 30 second 'pause' to let PeerBlock update its block-lists, it would launch uTorrent and have both of them write any temp files they would normally write into the ramdisk. (I use uTorrent here as an example because I know that uTorrent does write files to %TEMP%. In fact I don't use uTorrent any more - Tixati is much better - but I use Tixati Portable and as far as I'm aware it doesn't write files into %TEMP%.)

set TEMP=W:\TEMP
set TMP=W:\TMP
start "" "C:\Program Files (x86)\INTERNET\Mozilla Firefox\firefox.exe"
exit

The above would launch Firefox and have it write any temp files into the ramdisk.

From this you should see that you can create batch files on a per program basis and just have a shortcut to the *.bat in your Start Menu that you use for launching whatever program you want to write temporary files into the ramdisk.

You should also be aware that using these batch files will not globally reset your %TEMP% and %TMP% files for all programs after any one of the batch files has been run. The change in path only gets applied to the program(s) that are launched from within the batch file. Also, though, you should know that for any program you've launched using a batch file like those above then if one of those programs calls (launches) another program (as a sub-process, so to speak) then that sub-process will also write its temp files into the ramdisk - really this is the only potential pitfall you need to be aware of if using batch files like these.

The real advantage of these batch files is that other processes that write temporary files and expect to find them after a reboot (e.g. Win Update and installers) can carry on writing to %TEMP% and %TMP% as normal so you don't risk messing up your system at some critical point in the future.

Hope this is of help.
by Bennieboj on 2015/08/20 09:44:55 AM    
Hiya,

I was thinking of using environmental variables indeed, however in the current version of Tixati (2.16) I am unable to use them.
I can only select hardcoded paths, for example I can change the setting "Incomplete Piece Storage Location" (located under Settings, Transfers, Local Files) to the following:
C:\Users\*username*\AppData\Local\Temp
What I would like is to change it to %TEMP%.
Same goes for desktop, instead of having:
C:\Users\*username*\Desktop
I would like to use %USERPROFILE%\Desktop

I would like the program to user environmental variable expansion.
To implement this there are two options:
- Give the user the option to type the path with environmental variable himself and the system checks if this path is valid.
 The user types: "%USERPROFILE%\Desktop", the system sees that this path is valid because it replaces %USERPROFILE% with "C:\Users\*username*\Desktop".
- Let the user select a folder and detect if the path can be made more portable by replacing a part of it by an environmental variable.
The system has to check every startup if these paths are valid because the program can be moved to another system.
Also: not all environmental variables exist on all operating systems or all versions of the same OS.
Currently the user is only able to select a folder and the system returns the hardcoded path.
Thanks for your suggestions though, but I was already familiar with batch files that portabilise things and portable apps in general :)




This web site is powered by Super Simple Server