Page 1 of 2

Copying links and junctions

Posted: 22 Sep 2025 19:49
by Patrick Schönbach
How can I copy a folder structure preserving all links and junctions?

Re: Copying links and junctions

Posted: 23 Sep 2025 21:57
by admin
Copy a folders structure without files to another location? Links ARE files.

Re: Copying links and junctions

Posted: 23 Sep 2025 22:48
by bossi
he means junctions get lost when doing a copy and paste

why not create another junction instead of copy paste ? )

anyways , only time i worry about preserving Junctions is doing backups onto another ssd , i use syncback for that , it has granular control over how Junctions and Hardlinks etc are treated ...

Re: Copying links and junctions

Posted: 24 Sep 2025 13:07
by admin
bossi wrote: 23 Sep 2025 22:48 he means junctions get lost when doing a copy and paste
I think this is what File Explorer does, too, so it's kind of the standard. Currently there are no plans to offer more granularity here.

Re: Copying links and junctions

Posted: 24 Sep 2025 13:08
by Patrick Schönbach
Basically, I have a folder/file structure that serves as a template for new instances. Some parts of this structure are shared and should be linked, not copied. I am looking for a way to replicate this without having to manually recreate the links and junctions.

Re: Copying links and junctions

Posted: 24 Sep 2025 13:09
by highend
Scripting...

Re: Copying links and junctions

Posted: 24 Sep 2025 14:37
by admin
No time to test, but this tweak should do the trick for junctions (2048 is COPY_FILE_COPY_SYMLINK):

Code: Select all

CustomCopyFlags=2048
You probably need admin rights for it to work.
And, of course, this must be ticked: Configuration | File Operations | File Operations | Custom Copy Operations | Use Custom Copy

Re: Copying links and junctions

Posted: 24 Sep 2025 15:19
by Patrick Schönbach
admin wrote: 24 Sep 2025 14:37 No time to test, but this tweak should do the trick for junctions (2048 is COPY_FILE_COPY_SYMLINK):

Code: Select all

CustomCopyFlags=2048
You probably need admin rights for it to work.
And, of course, this must be ticked: Configuration | File Operations | File Operations | Custom Copy Operations | Use Custom Copy
Where do I put this? In xyplorer.ini? If so, which section?

Re: Copying links and junctions

Posted: 24 Sep 2025 15:20
by admin

Re: Copying links and junctions

Posted: 24 Sep 2025 15:33
by Patrick Schönbach
admin wrote: 24 Sep 2025 14:37 No time to test, but this tweak should do the trick for junctions (2048 is COPY_FILE_COPY_SYMLINK):

Code: Select all

CustomCopyFlags=2048
You probably need admin rights for it to work.
And, of course, this must be ticked: Configuration | File Operations | File Operations | Custom Copy Operations | Use Custom Copy
It still creates a .copy of the junction's content.

Re: Copying links and junctions

Posted: 24 Sep 2025 16:14
by admin
Okay, I'll check that later.

Re: Copying links and junctions

Posted: 24 Sep 2025 16:25
by Patrick Schönbach
Is it possible to use Custom Copy for "New XY"? That would be cool. :)

Re: Copying links and junctions

Posted: 24 Sep 2025 16:26
by admin
Hä?

Re: Copying links and junctions

Posted: 24 Sep 2025 16:45
by Patrick Schönbach
admin wrote: 24 Sep 2025 16:26Hä?
Last time I used "New XY", the normal Windows copy routine was used.

Re: Copying links and junctions

Posted: 24 Sep 2025 17:11
by admin
What is "New XY"?