paste hard links to same file to multiple folders

Off-topic posts of interest to the "Everything" community.
Post Reply
jimspoon
Posts: 187
Joined: Tue Apr 26, 2011 11:39 pm

paste hard links to same file to multiple folders

Post 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.
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: paste hard links to same file to multiple folders

Post 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.
therube
Posts: 4955
Joined: Thu Sep 03, 2009 6:48 pm

Re: paste hard links to same file to multiple folders

Post 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.
jimspoon
Posts: 187
Joined: Tue Apr 26, 2011 11:39 pm

Re: paste hard links to same file to multiple folders

Post 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.
jimspoon
Posts: 187
Joined: Tue Apr 26, 2011 11:39 pm

Re: paste hard links to same file to multiple folders

Post by jimspoon »

Thank you therube, that is a very good idea.
void
Developer
Posts: 16680
Joined: Fri Oct 16, 2009 11:31 pm

Re: paste hard links to same file to multiple folders

Post by void »

I will consider the option to paste a hard link / symbolic link.

Thank you for the suggestion.
Post Reply