Check existing softlink

I use softlinks and create them automatically using a button like this:

Copy MAKELINK=softlink "D:\Symlinks\Local\*" To "%localappdata%"

How can I skip existing ones instead creating a second followed by "(1)" or similar (e.g. "link" and "link (1)")?

Copy's argument WHENEXISTS doesn't seem to work. You could deselect files prior to copying via Select DESTTOSOURCE=notin or check with a script using fsu.Exists().

1 Like

Actually, using a temp folder is easier:

Delete D:\temp123 QUIET
Copy MAKELINK=softlink D:\testSymlinks\* CREATEFOLDER=D:\temp123
Copy MOVE D:\temp123\* TO=D:\newlinks WHENEXISTS=skip
1 Like

That's a good idea, thanks.