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
    
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

2 Answers 2

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
    
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

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

share

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .