Symlinking Multiple Files at Once?

Symlinking Multiple Files at Once?

On Windows 10, how do I symlink several files at once?

On Linux it’s easy:

ln -s source/directory/* destination/directory/

1 Answer

Windows has no equivalent command. You could use a .bat file similar to this:

@echo off
for /f %%f in ('dir /b "C:\path\to\source\directory"') do (
    mklink "C:\path\to\destination\directory\%%f" "C:\path\to\source\directory\%%f"
)
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.