I have a folder with lots of nested folders and files, as usual how typical folders go. While I'm having trouble copying the folder (the progress simply freezes until explorer is killed/restarted), I found that there are symlinks (created using mklink /D) here and there and probably the problem is because of those. Is there any way to copy all with symlinks? or alternately is there any other way to create symlinks that won't create issue for copying?
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.– Community BotMay 10, 2022 at 10:17
-
[Possible Duplicate works with windows 7 and possibly works with windows 10 ](superuser.com/questions/148099/…)– LuciferMay 10, 2022 at 10:24
2 Answers
I assume that you are using windows explorer's interface?
For best results, it is recommended to use robocopy to copy files. It should come bundled with your installation of windows, and I believe its default behavior is to copy files that are symlinked rather than copying the symlink itself, but this can be changed.
If the source file is a symbolic link, the actual file copied is the target of the symbolic link.
There are user interfaces available for it, so you don't have to use the command line interface. See the answer to this question for details on a GUI to use.
-
1Note that the size of the dir you're trying to copy does not include the size of the symlinked dirs and files, so you may end up requiring a lot more space than you expected. Depending on your reason for copying, I would consider copying the symlinks as symlinks and leave the files in their original location.– MiGMay 10, 2022 at 10:41
You could use the Link Shell Extension and one of its many clone options to achieve what you want.
P.S. I suggest exploring the various cloning options as there are some rather exotic ones and one of them may provide an alternative solution to your actual requirements that you may not have previously considered.