1

I have a folder with some file inside of it

I need to move those files and create a symlink instead. As a cross-platform, this will be run on linux and maybe in windows in the future

  • How to create Symlink on linux using C#/.Net core?
  • How to know if a file is a real file or a symlink using C#/.Net core?

Environment: .net core 3.1 target platform: centos 7 develop platform: win10

Hades
  • 1,975
  • 1
  • 23
  • 39
Max94
  • 121
  • 1
  • 12

1 Answers1

0

You can use

File.CreateSymbolicLink(path, target )

path is the destination of the link and target is the path the symbolic Link points to.

Lee Taylor
  • 7,761
  • 16
  • 33
  • 49