Create softlink for all folders

I need a button which creates a softlink for each subfolder in a root folder and excludes existing files.

Thanks in advance.

Doesn't sound to hard, but can you give some more details? The rootfolder is the current folder or really the root of the drive you're currently in?

Background: There're some apps and games I have "temporarily" installed, but not stored in my sys-backup. They're are installed on a 2nd SSD, but because apps etc. even in 2015 are not able to store their settings in their own or a user-specified folder (not to mention the missing backup/restore like DO), they will be stored in local, locallow, roaming or programdata. So I backuped them manually and on a restore I used a button which automatically copied them back.

But it would be faster and easier just to symlink them with a button, which automatically selects all existing folders (amount varies, because subfolders will be added/removed) and creates a symlink for each to the specified folder (e.g. all folders in "Copy-Of-Roaming" to "Roaming").

Another advantage using symlinks is that I wouldn't need to backup existing settings before restoring sys. And I don't want to symlink Roaming etc. itself (like some people do), because I want to keep it clear and on a fresh install you could run into problems.

Seems easier to include your whole profile folder in the backup. You're bound to miss something otherwise. (OTOH, there's a lot of large stuff in the profile you might not want to backup, but maybe it's easier to symlink those folders out rather than everything else in? Excluding a few large things you don't want is safer than not remembering to include something you do want.)

Either way, you can use the built-in command for creating symlinks, you just need to go into the Copy-of-Roaming dir, select everything, then run the command with the Roaming dir as the destination.

Doing it manually is not the way I want (I already have a symlink-button).

What you mean with "out"? I have all folders stored e.g. on "D:\folder.." and create a symlink to e.g. "..\roaming\folder..".

I won't miss anything, because I know which app needs which folder (also sometimes regs are requiered). You may need to know, I never create a backup from running sys. I install a sys, include the necessary stuff and configure everything, than create a backup. A restore is just to have a clean sys again and/or to add changes/updates and then backup again. And for the additional apps (which I don't use everyday) I just want a comfortable way to create the symlinks. I can't forget anything, because for each app it's necessary to find these things out (btw. it's not only for private fun, on customers installations I don't want to configure the same settings hundred of times!).

I don't know why we need to discuss things which a) I want and b) perfectly works over years w/o any problems? I just want to know how to create such a button, because coding is simply not my fav thing.

What is wrong with the normal makelink buttons?

How often do you do this that the extra second it takes to enter the folder and push Ctrl-A matters? A script to avoid that is possible, but it seems like it would take more time to write than the time it would save, if it's something done once per machine setup. Maybe I have misunderstood, in which case if I tried writing the script for you I'd probably write the wrong thing.

Often enough :slight_smile:. There're some more steps I do on a restore or installation (which are already automated), so having one button doing all these things automatically simply saves time (and avoids errors, e.g. when jumping around all these folders this also could end in copying from/to wrong folder). The command could be also useful for other things for me.

I only need an example for a button, which creates separate symlinks of all subfolders within a folder in another specified folder (if possible existing files should be ignored).

So let's say we have the original folders in "D:\Settings\Roaming". Now the command should create symlinks for each folder, which are included in "D:\Settings\Roaming", and link them to "C:\Users...\Appdata\Roaming" (or %Appdata%).

For the other folders like Local, ProgramData etc. I just would need to copy the command and change the source- and dest-folders.

Edit: But if it's too complicated (which I can't estimate, because I don't know if it can be done with an internal DO-command or needs to be scripted), then please let me know.

So what about this to give as a start?

In case you want to apply this to all the folders currently in the filedisplay and not just for the selected ones add "SELECT ALL" at the top. If you want those symlinks to be created in a special place, add "TO="C:\myplace" to the copy command.

@dirsonly Copy MAKELINK=softlink

Thanks tbone, but I don't want to use the lister.

I wonder why we discuss this simple button... I've found out that

Copy MAKELINK=softlink "D:\Test1\*" To "D:\Test2\"

already copies all folders within Test1 to Test2 as symlinks!!! I didn't thought that it would work that easy :smiley:! That's what I want!

Now need little help exluding files from copy makelink, please.

Without scripting, I think a predefined filter (for folders only) is the only way to leave out the files. Did not try that though.

Copy MAKELINK=softlink "D:\Test1\*" To "D:\Test2\" FILTER=FoldersOnly

PS: Whenever somebody needs a button, I assume it shall affect items in the lister. I read through all the posts again and I think it's hard to read out that important information. Anyway, we're getting there it seems! o)

I thought it was clear that I want some kind of automation. I also wrote that I want "doing all these things automatically" and also that I don't want to switch through x folders to create the softlinks manually (and avoid mistakes)! See also Leo's second answer.

I just didn't know/tested, that simple "makelink" automatically creates a symlink for each folder - grmpf!

Does it fly now in conjunction with a filter?

I am actually irritated, that Copy MAKELINK=softlink "D:\Test1\*" To "D:\Test2\" works for you.

I tried before with this, and it failed to create the links, it just copied the items.
The difference is that I put the source in front of the MAKELINK switch.

Copy "D:\Test1\*" MAKELINK=softlink To "D:\Test2\"

Hi tbone,

yes it works with makelink at first, tested 2 times. But found out, that if a symlink already exists, there will be copies with "(1)". It's not important, because I only press the buttons once after a restore, but maybe you have a fast solution, that a symlink will not be created if it already exists.

I wonder, that the command needs to be slightly different to work for you. So I tested it also on my Tablet and for me both solutions work (makelink at first place and after source).