Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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" )
pause

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

share|improve this question

1 Answer 1

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

 
discard

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.