Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a batch-file that creates (DIR) junction points; I commonly use. Bellow is a script, which creates multiple links, to the same location.

@echo off
for /f %%i in (input.txt) do (
mklink /j "%%i" "C:\test" )

How do I modify it to use: (input.txt) for links , and then (output.txt) for targets?

share|improve this question

Does the input data have to be in two separate files? For example, if your Input.txt looks like this:

Link 1|Target 1
Link 2|Target 2
Link 3|Target 3

Then you can use something like this:

for /f "tokens=1,2 delims=|" %%i in (Input.txt) do @mklink /j "%%i" "%%j"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.