Page 1 of 1
Add a new TC environment var. %$DOWNLOADS%
Posted: 2016-08-09, 22:29 UTC
by Jivan_Mukta
Like currently existing %$DESKTOP%, %$MYMUSIC%, %$MYVIDEO%, etc.
%$DOWNLOADS% will be much better than %USERPROFILE%\Downloads
because somebody could change the standard place by the win settings
to save more free space on the system drive.
I hope it is easy to realize TC takeing the win registry value like the standard command line
REG query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}"
Otherwise the idea can be realized by runing TC in a batch file
Code: Select all
FOR /F "tokens=2* delims= " %%A in ('REG query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{374DE290-123F-4565-9164-39C4925E467B}"') do SET TCdownloads=%%B
START /D"Path to TC" TOTALCMD%PROCESSOR_ARCHITECTURE:~3,2%.EXE /S %1 %2
After that the command
CD %TCdownloads% will work.
See also
http://www.reddit.com/r/learnpython/comments/4dfh1i/how_to_get_the_downloads_folder_path_on_windows/
Posted: 2016-08-10, 00:07 UTC
by Skif_off
AFAIR "{374DE290-123F-4565-9164-39C4925E467B}" works with WinVista and higher and TC uses
CSIDL.
For Directory Hotlist you can try
TCShellCD:
Code: Select all
TCShellCd.exe HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\{374DE290-123F-4565-9164-39C4925E467B}
Or script (VBS, AutoHotkey, AutoIt).
If you want environment variable then try
Autorun:
Code: Select all
...
LoadLibrary Plugins\Autorun_Sysinfo.dll
...
If %OSVer% <> 2000 Or %OSVer% <> XP Or %OSVer% <> 2003 Or %OSVer% <> 2003R2 Then
RegRead Down "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "{374DE290-123F-4565-9164-39C4925E467B}"
SetEnv Downloads %Down%
EndIf
Posted: 2016-08-10, 07:39 UTC
by Lefteous
The current system called registry env. strings is based on so called CSIDL identifiers. Since Windows Vista there is a new system called 'known folders'. While 'Downloads' is defined as a known folder there is no equivalent in the CSIDL system ( see:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457%28v=vs.85%29.aspx ).
Introduction to known folders:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb776911%28v=vs.85%29.aspx
Adopting the new system would add quite a few possibilities.
Posted: 2016-08-10, 09:06 UTC
by Horst.Epp
For me
TCShellCd.exe HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\{374DE290-123F-4565-9164-39C4925E467B}
works fine under Windows 10 x64
Posted: 2016-08-10, 09:16 UTC
by Jivan_Mukta
I see CSIDL standard is a restriction.
So I realize in *.ini
Code: Select all
[em_currentuser_Downloads]
;cmd=cd %USERPROFILE%\Downloads
cmd=%Commander_Path%\TCShellCd.exe HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\{374DE290-123F-4565-9164-39C4925E467B}
menu=Current user downloads
and it works fine.
I hope TCShellCd.exe will not be rejected by AntiVirus software, like
TCMC.exe.
Thanks a lot for explanations and suggestions!
Posted: 2016-08-10, 09:49 UTC
by Lefteous
2
Horst.Epp
For me
TCShellCd.exe HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\{374DE290-123F-4565-9164-39C4925E467B}
works fine under Windows 10 x64
What is your point?
Posted: 2016-08-10, 13:04 UTC
by Horst.Epp
Lefteous wrote:2
Horst.Epp
For me
TCShellCd.exe HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\{374DE290-123F-4565-9164-39C4925E467B}
works fine under Windows 10 x64
What is your point?
Because you said:
Since Windows Vista there is a new system called 'known folders'. While 'Downloads' is defined as a known folder there is no equivalent in the CSIDL system
Posted: 2016-08-10, 13:38 UTC
by Lefteous
2
Horst.Epp
Since Windows Vista there is a new system called 'known folders'. While 'Downloads' is defined as a known folder there is no equivalent in the CSIDL system
Which is correct - isn't it?
Posted: 2016-08-10, 15:40 UTC
by Horst.Epp
Lefteous wrote:2
Horst.Epp
Since Windows Vista there is a new system called 'known folders'. While 'Downloads' is defined as a known folder there is no equivalent in the CSIDL system
Which is correct - isn't it?

Posted: 2016-09-01, 09:53 UTC
by Skif_off
Sorry, I lost one string

, it will be correctly:
Code: Select all
...
LoadLibrary Plugins\Autorun_Sysinfo.dll
...
StrMid OSVer %SYSINFO_OSVERSION% 5
If %OSVer% <> 2000 Or %OSVer% <> XP Or %OSVer% <> 2003 Or %OSVer% <> 2003R2 Then
RegRead Down "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "{374DE290-123F-4565-9164-39C4925E467B}"
SetEnv Downloads %Down%
EndIf