Copying links and junctions

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Patrick Schönbach
Posts: 68
Joined: 26 Apr 2015 15:25

Copying links and junctions

Post by Patrick Schönbach »

How can I copy a folder structure preserving all links and junctions?

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying links and junctions

Post by admin »

Copy a folders structure without files to another location? Links ARE files.

bossi
Posts: 144
Joined: 30 Jul 2022 11:09
Location: Win11-latest, XYx64 latest, 4K@100%

Re: Copying links and junctions

Post 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 ...

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying links and junctions

Post 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.

Patrick Schönbach
Posts: 68
Joined: 26 Apr 2015 15:25

Re: Copying links and junctions

Post 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.

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Copying links and junctions

Post by highend »

Scripting...
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying links and junctions

Post 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

Patrick Schönbach
Posts: 68
Joined: 26 Apr 2015 15:25

Re: Copying links and junctions

Post 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?

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying links and junctions

Post by admin »


Patrick Schönbach
Posts: 68
Joined: 26 Apr 2015 15:25

Re: Copying links and junctions

Post 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.

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying links and junctions

Post by admin »

Okay, I'll check that later.

Patrick Schönbach
Posts: 68
Joined: 26 Apr 2015 15:25

Re: Copying links and junctions

Post by Patrick Schönbach »

Is it possible to use Custom Copy for "New XY"? That would be cool. :)

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying links and junctions

Post by admin »

Hä?

Patrick Schönbach
Posts: 68
Joined: 26 Apr 2015 15:25

Re: Copying links and junctions

Post by Patrick Schönbach »

admin wrote: 24 Sep 2025 16:26Hä?
Last time I used "New XY", the normal Windows copy routine was used.

admin
Site Admin
Posts: 64917
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Copying links and junctions

Post by admin »

What is "New XY"?

Post Reply