You can have the remote folder path automatically set to the current folder on your server when starting a file upload or download in Token2Shell. It can be done in two ways:

1. Use XTerm escape sequences for setting the window title

If you append the current folder path to the window title separated by a colon (:), Token2Shell can automatically extract the path and use it as the remote folder path.

Such configuration for shell/command prompt is already common on Unix-like servers. Hence, you probably don't need to change your login shell script. If your window title doesn't already show the current folder path, please visit here (http://www.faqs.org/docs/Linux-mini/Xterm-Title.html) for additional information about changing the window title using XTerm escape sequences.

2. Use Token2Shell proprietary escape sequences

Token2Shell supports the following escape sequence for setting the remote folder path:

<ESC>]5001;{remote path}<BEL>
EXAMPLE
<ESC>]5001;/home/user<BEL>

If you're using Bash shell, you can change 'PROMPT_COMMAND' environment variable and track the current folder path. The following shows an example:

PROMPT_COMMAND='echo -ne "\033]5001;"; if [ ${PWD:0:${#HOME}} == ${HOME} ] && ([ ${#PWD} == ${#HOME} ] || [ ${PWD:(${#HOME}):1} == "/" ]); then echo -ne ".${PWD:${#HOME}}"; else echo -ne "${PWD}"; fi; echo -ne "\007";'; export PROMPT_COMMAND