tcLinkSel - Links made from TC selection, incl autoit source

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

tcLinkSel - Links made from TC selection, incl autoit source

Post by *magz »

Link from TC selection v1.04

It's a script for making hardlinks, symbolic links, junctions and shortcuts
from the selected files and folders in Total Commander, to TC destination

From v1.03 this script should help you install/set it up as a toolbar button.
If you run it and press "yes" this Total Commander button generator should appear:
Image: http://picload.org/image/pagciwi/tclinksel003.jpg
It should also work as an installer if you choose to change the command path
it will make a copy of itself at the chosen location and ask if it should delete itself after making the button and exiting.

But if you prefer it the "old" way:
To manually set this up in Total Commander:
Drag and drop of tcLinkSel.exe to the TC toolbar
then add this to the newly created buttons parameters: %L "%T"

Alternatively for saved settings, you can run with different ini files by
Adding /i or /ini followed by the path to the ini file: %L "%T" /i [path to .ini file]
The ini path can be a relative path.
Adding /q or /quiet will enable silent mode (no graphical user interface) if .ini file exists.
Silent mode parameters: %L "%T" /q /i [path to .ini file]
Thus you can rename ini files and make various TC buttons performing the saved choices if you prefer.

This should work in Windows versions from Vista and later windows releases.
Admin rights is required to make symbolic links.

This is a setup I typically use to move folders of installed games or programs:
Image: http://picload.org/image/pagciwa/tclinksel001.jpg

If you want to make shortcuts, the icon selected can also be saved with the settings, so you can have multiple buttons for various icon choices f.ex
Image: http://picload.org/image/pagciwl/tclinksel002.jpg

All downloads [Yandex mirror]
Download source code (autoit) [Yandex mirror]
Download 32bit executable [Yandex mirror]
Download 64bit executable [Yandex mirror]

I'm a hobby programmer, for the filecopy function displaying a progress bar I got some help from a mate of mine.
This part is now under reconstruction however.
So a known bug is: no file transfer progress bar.
It will be added soon.

What I lack in coding skills I try to compensate for with ascii art in the code header:

Code: Select all

	q@@@B@@@B@7.:ii7:i;:i;:i;::.r@B@B@B:
	B@MBBMMMM@Br ::i.    BB@B@r  rB@MMM@Bq
	@MMM@MMMM@@r.;: .,   B@B@B7 .r@BMMMM@BBr
	BMO@@MMMM@B7 ..,    .@B@B@r. 7B@MMMBM@Ou
	@MMM@MMMBB@7 ..  .,  M@B@B7..7@BBMMMMBZ7
	@MMBBMMMM@B7    .. .i@B@@@L  .B@MMMMM@N7
	@MMB@MMMMM@i      :..u5UF5   :@@MMMMMBE7
	@MMMM@B@B@BBL7LrLjvvri:::i:r2MB@MMMMM@N7
	@MMMBB@B@@@B@B@B@B@B@B@@@@@B@B@B@BBMBBE7
	BMM@B@B@@@@@B@B@B@@@@@B@B@B@B@B@B@BMM@0v
	@MMBM                            v@BBBE7
	BMM@M  Link TC selection v1.03   iB@M@Nv
	@MBBM SBBMBMBMBMBMBMBMBMBMBMBB@M i@BBBE7
	BBM@B                            7B@M@qv
	@MBB@  A Total Commander script  7@BBB07
	BMM@M P@B@B@B@B@B@@@@@@@@@B@B@B@ i@@M@0v
	@MBB@                            7@BBBE7
	BMM@B  written by Magz 20.09.15  7B@M@0v
	@MBBB NB@@@B@B@@@@@B@B@B@B@B@@@B i@BBBZ7
	B@B@M                            rB@B@07
	@B@@B  Apeskalle helped me (tnx) r@B@BOv
	0@@@B@B@B@B@B@@@@@B@B@B@B@B@B@B@@@@@B@P2
	uXXSqPqP0PNP0PNqNP0q0q0P0qNP0PPFS1ku.
I hope someone finds this useful, I find it handy myself for situations like;
  • Freeing up installed games and programs I don't use often from my SSD drive with limited space by moving it to a slower but bigger drive and linking from the old location.
  • I want multiple copies available without the extra space, like if I want to arrange my digital comics by both artist, production company and genre in the filesystem.
  • When I want to have multiple various configs for programs, like a portable program, I link to all files/folders in the program folder, except the settings files/folders I need to vary
  • If I want to share something on multiple torrent trackers, but want just one tracker listed pr torrent file (as is required by many sites), it's a workaround to make a hardlink/junction with a different name to force torrent client to generate a new hash ID for the file/folder to be shared
I'm open for suggestions on changes and of course bug reports.
If you rewrite my code and improve it somehow, please do share with us. :)
Last edited by magz on 2015-10-05, 20:16 UTC, edited 21 times in total.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

There are some existing tools, why don't you want to use them? :)

NTLinks Maker
NTFS Links
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2magz

Parameters should be %L "%T "

I cannot get your script to make symbolic links, only hardlinks and junctions...
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I cannot get your script to make symbolic links, only hardlinks and junctions...
Elevation is required for symlink creation, perhaps it is the problem.
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

petermad wrote:2magz

Parameters should be %L "%T "

I cannot get your script to make symbolic links, only hardlinks and junctions...
Thanks, I updated the description with the added quotes.
I've also changed the script a bit now, the script should check for admin rights, and ask for elevation. I also added the ability to save settings, load ini files and run it in quiet mode.

You are my hero for making and maintaining the TC extended menu's btw. :)
MVV wrote:There are some existing tools, why don't you want to use them? :)

NTLinks Maker
NTFS Links
They are great tools, and are written in a more professional programming language. My script is just more tailored to my needs (naturally, since I wrote it), I like f.ex that my script has the ability to move before linking (handy for me when moving installed programs/games), and since I release it with the source code it can be customized to fit others peoples needs I figured. I also wanted a script to make shortcut .lnk files.
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[OT]

Post by *petermad »

You are my hero for making and maintaining the TC extended menu's btw
Thanks - I hope to make a version for Windows 10 soon - there are some tricky things though...
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Found a bug in my 1.01 code relating to reading the ini file for the "move source and link to destination" checkbox, so I just uploaded v1.02 which should fix that.
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

I uploaded v1.03 now.
It has a lot of changes to improve user friendliness and ease of use.
In particular some new functions I wrote to generate a Total Commander toolbar button, I tried to make it look similar to Total Commanders regular button editor: Image: http://picload.org/image/pagciwi/tclinksel003.jpg
It should also work as an installer if you choose to change the command path it will make a copy of itself at the chosen location and ask if it should delete itself after making the button and exiting.
I'm hoping for some feedback on how that works, as I plan to re-use the toolbar button adding functions in other scripts of mine and want it to work smoothly.

I had to temporarily disable the function giving graphical display while copying (for when moving then linking) because I discovered a bug with spaces in foldernames in the _fileCopyGUI function, but thats the function my mate Apeskalle helped me do, so I am going to bother him about that and bring the progress bar while copying back for a soon to come version.
It copies fine now, just no progress bar atm.
Maybe I should make it do the copy operation with Total Commander?
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2magz

My Avast Antivirus blocks tcLinkSel_x64.exe (unpacked) from being downloaded - no problemes with tcLinkSel.exe - maybe it is a false warning.

I can also doeload the UPX packed version of tcLinkSel_x64.exe without problems, but not tcLinkSel_x64.7z
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

petermad wrote:2magz

My Avast Antivirus blocks tcLinkSel_x64.exe (unpacked) from being downloaded - no problemes with tcLinkSel.exe - maybe it is a false warning.

I can also doeload the UPX packed version of tcLinkSel_x64.exe without problems, but not tcLinkSel_x64.7z
Yeah I swear it's a false warning. It's just avast being silly. It's weird that it flags the uncompressed but not the upx packed exe. It's kind of why I provide the unpacked ones to avoid such false positives.
The source code is there as well so alternatively one can run the au3 file with autoit. I recompiled, and reuploaded the unpacked x64 executables. No change in the code though.
User avatar
petermad
Power Member
Power Member
Posts: 14791
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Avast still complains about the unpacked file...
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

petermad wrote:Avast still complains about the unpacked file...
It's notorious for false positives that Avast antivirus proggy.
it's probably flagging most autoit scripts that has the latest autoit64 bit executable embedded. The script has Autoit v3.3.14.2
Can you check these please, I encoded the same script unchanged, but with older compilers (the compilers crash if I go back more then v3.3.10.0 from 2013):

autoit-v3.3.10.0-tcLinkSel.exe
autoit-v3.3.10.1-tcLinkSel.exe
autoit-v3.3.10.2-tcLinkSel.exe
autoit-v3.3.12.0-tcLinkSel.exe
autoit-v3.3.14.0-tcLinkSel.exe
autoit-v3.3.14.1-tcLinkSel.exe

temporary location:
https://yadi.sk/d/ma0onv2EjUngR/tcLinkSel/binary_X64/unpacked/false_positive_test
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

magz,
You can test it yourself: https://www.virustotal.com/
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

virustotal test of tcLinkSel_x64.exe unpacked

2 antivirus tools I've never heard of: "Jiangmin" and "Zillya" is finding a false positive according to virustotal. It claims Avast to be ok with it however. 54 out of 56 antivirus tools are ok with the exe according to Virustotal.

Those two antivirus tools seem obscure, Avast is however used by a lot of people, so that bothers me more.
Anyways, as I released this as open source from day 1, I'm essentially playing with open cards and I feel there is much less need for suspicion on malicious code due to that.
If I where to write something fishy I'm sure I'd be called out on that particular piece of code by somebody here at this forum.

I'd like to recommend my favorite free antivirus checking method:
http://www.eset.com/int/home//products/online-scanner/
Thats for manual scans, the paid version is a regular antivirus tool.
They have way better heuristics in finding viruses, so you'll find much less false positives and more real viruses. With the additional bonus of no system resources used with the manual option, and much less resources used by the realtime scanner as well (much less than Avast from last I checked). Thats enough Eset commercials from me though.
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

I forgot to mention that in v1.03 I changed the asking for elevation to only occur right before when the script tries to make symbolic links. As I felt it was unnecessary to ask for admin right just to make shortcuts, junctions and hardlinks when not required.
I am running as admin always though, so I havent fully tested that part.
I hope it works.
Post Reply