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 would like to create a bat file to copy a directory, with everything in it (sub-directories, including hidden directories) - by making hard links.

I tested xcopy %source% %destination% /E /C /R /I /K /Y

I haven't seen anywhere an option to make hard links though...

Is there any way to copy and make hard links at the same time ?

share|improve this question
    
What is the advantage of hard-links for each file instead of one soft-link for the whole directory? –  Robert Aug 22 '12 at 8:31
add comment

2 Answers

Use the Link Shell Extension. It has an option to create a „Hardlink Clone”.

share|improve this answer
add comment
up vote 0 down vote accepted

I ended up writing my own script in c++, with the advantage (over kinokijuf's solution) of less overhead, plus I can choose which files to copy and which to hard-link.

share|improve this answer
    
You should paste the source code here if possible, so that others can benefit from it, too. –  Cristian Ciupitu Aug 27 '12 at 18:02
add comment

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.