Page 1 of 1

paste hard links to same file to multiple folders

Posted: Wed Nov 02, 2022 4:17 pm
by jimspoon
Say you want to paste hard links to the same file in multiple folders scattered across your volume. Everything provides a good way to quickly find destination folders using the folder: modifier. But the only way I know how to do this is using Link Shell Extension. LSE will allow you to paste a hard link only a single time to a single folder. After the first paste, the "Drop As" option no longer appears. So is there another way to paste the same hard link to multiple destination folders found with Everything, without having to use "Pick Link Source" repeatedly? Is there another way?

I guess the best option may be to repeatedly right-drag the file to each desired destination folder, then click Drop As ... then Hardlink. But you'd have to have the source file showing and able to click and drag it.

p.s. I emailed the author of LSE about this but never got a reply.

Re: paste hard links to same file to multiple folders

Posted: Wed Nov 02, 2022 5:31 pm
by raccoon
The experimental version Everything 1.5 Alpha provides the ability to Ctrl+V paste a file to multiple selected folders or object parents, but a distinct file is created in each folder.

Perhaps @void could include an option to create hard/symbolic links to the source file instead of discrete copies.

This post belongs in the Everything > Everything 1.5 Alpha forum section.

Re: paste hard links to same file to multiple folders

Posted: Wed Nov 02, 2022 6:17 pm
by therube
Gather your wanted directories - using Everything (of course).
Send that list to a batch file that then creates a hard link in of those directories.

Everything search: firefox.exe
(to find places where firefox "resides", installed or otherwise)

Copy your wanted directories to the clipboard (using Everything, of course).
(F5, in my case, does that.)

Code: Select all

C:\000\TMP\SEA\TOIR\Browser\
C:\000\WLIB\FIREFOX\FF17.0.11esr\
C:\000\WLIB\FIREFOX\Firefox20\
C:\000\WLIB\FIREFOX\Firefox24.8.1esr\
C:\000\WLIB\FIREFOX\Firefox28 (pre-australis)\
C:\000\WLIB\FIREFOX\Firefox52.ESR\
Find the file you want to make a hard link of.
Everything -> blockupdates.7z

Copy that link to clipboard (using Everything, of course).
(F6, in my case, does that.)

Code: Select all

C:\LIB\NETT\Mozilla\blockupdates.7z
Fire up your batch file that creates multiple hard links to a file.

hardlinkmaker.bat (pseudo-code):

Code: Select all

read File to copy: %1
pop %1
read Directory(ies) to link to: %*
for i in (%*)
mklink /h %%i %1
next i
And of course, your copied (file & directory) links went into your clipboard manager (CLCL), that you then use a shortcut key to paste into your batch file (read) prompts.

Re: paste hard links to same file to multiple folders

Posted: Thu Nov 03, 2022 11:16 pm
by jimspoon
raccoon wrote: Wed Nov 02, 2022 5:31 pm The experimental version Everything 1.5 Alpha provides the ability to Ctrl+V paste a file to multiple selected folders or object parents, but a distinct file is created in each folder.

Perhaps @void could include an option to create hard/symbolic links to the source file instead of discrete copies.

This post belongs in the Everything > Everything 1.5 Alpha forum section.
Thank you raccoon. Ctrl+V to paste to a selected folder(s) is very useful. A related keystroke to paste a hardlink or symlink would be great. I hope @void will make this possible.

Re: paste hard links to same file to multiple folders

Posted: Thu Nov 03, 2022 11:18 pm
by jimspoon
Thank you therube, that is a very good idea.

Re: paste hard links to same file to multiple folders

Posted: Fri Nov 04, 2022 10:55 am
by void
I will consider the option to paste a hard link / symbolic link.

Thank you for the suggestion.