Author

Topic: [Solved]Bitcoin Client 0.4 & Win7 junction problem. (Read 2243 times)

hero member
Activity: 770
Merit: 502
Tried to create the junction
Code:
C:\Users\Admin>mklink /J C:\Users\Admin\AppData\Roaming\Bitcoin D:\Bitcoin
Cannot create a file when that [b]file already exists[/b].
So bitcoin client and trying to create the junction are fighting each other resulting in, cannot use a junction
Its all there to solve your "problem".
simply move all the files to the destination and delete the directory %appdata%\bitcoin
THEN you can create your junction (due to the same name) quite fine - i am doing this all the time when installing at friends

btw: for those not comfortable on commandline: http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

the thing with datadir is.. if you accidently run some client (other/newer version etc.) without the switch.. you still can rely on the junction.

Did you read my post? After "simply move all the files to the destination and delete the directory %appdata%\bitcoin, THEN you can create your junction" firing up bitcoin client throws this error.

Code:
************************
EXCEPTION: N5boost11filesystem316filesystem_errorE      
boost::filesystem::create_directory: Cannot create a file when that file already exists: "C:\Users\Admin\AppData\Roaming\Bitcoin"      
D:\Program Files (x86)\Bitcoin\bitcoin.exe in AppInit()      



************************
EXCEPTION: N5boost11filesystem316filesystem_errorE      
boost::filesystem::create_directory: Cannot create a file when that file already exists: "C:\Users\Admin\AppData\Roaming\Bitcoin"      
D:\Program Files (x86)\Bitcoin\bitcoin.exe in CMyApp::OnUnhandledException()  

But the datadir cmd is working quite well.
sr. member
Activity: 314
Merit: 250
Tried to create the junction
Code:
C:\Users\Admin>mklink /J C:\Users\Admin\AppData\Roaming\Bitcoin D:\Bitcoin
Cannot create a file when that [b]file already exists[/b].
So bitcoin client and trying to create the junction are fighting each other resulting in, cannot use a junction
Its all there to solve your "problem".
simply move all the files to the destination and delete the directory %appdata%\bitcoin
THEN you can create your junction (due to the same name) quite fine - i am doing this all the time when installing at friends

btw: for those not comfortable on commandline: http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

the thing with datadir is.. if you accidently run some client (other/newer version etc.) without the switch.. you still can rely on the junction.

*edit: finally it seems i should have read more carefully.. but i would say its not a solution but a workaround to rely on datadir-option.
i estimate this behavior being a bug in new client version  Undecided
c_k
donator
Activity: 242
Merit: 100
Ok your problem is obvious now, -datadir= is for bitcoin.exe (from https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_argumentsSmiley
hero member
Activity: 770
Merit: 502
Hm, mklink /J datadir C:\Users\Admin\AppData\Roaming\Bitcoin D:\Bitcoin does not work.
c_k
donator
Activity: 242
Merit: 100
If you do not have an answer, do not post in my thread.

You already have the answer bro!

And how is that? This is exactly what I did for 0.3.24 beta and had no problem and just did it again for a test with 0.3.24 beta, no errors, no problems.

So if someone has a solution for 0.4 please post it.

The first reply in this thread _is_ the answer Smiley
c_k
donator
Activity: 242
Merit: 100
If you do not have an answer, do not post in my thread.

You already have the answer bro!
c_k
donator
Activity: 242
Merit: 100
It is an option, kindly RTFM  Wink
hero member
Activity: 770
Merit: 502
Does anyone have any suggestions? Ran into this problem that found a solution?
Yes. Use the datadir switch.


Care to explain please?

Thanks.
hero member
Activity: 576
Merit: 514
Does anyone have any suggestions? Ran into this problem that found a solution?
Yes. Use the datadir switch.
hero member
Activity: 770
Merit: 502
Edit:
Solution found here. https://bitcointalksearch.org/topic/m.542485
End of edit:

I've got a new problem.

I've uninstalled my 0.3.24 beta bitcoin client which had the C:\Users\Admin\AppData\Roaming\Bitcoin junction pointing to D:\Bitcoin

I've installed the newest release Bitcoin Client 0.4. Ran it, got an error

Code:
************************
EXCEPTION: N5boost11filesystem316filesystem_errorE      
boost::filesystem::create_directory: Cannot create a file when that file already exists: "C:\Users\Admin\AppData\Roaming\Bitcoin"      
D:\Program Files (x86)\Bitcoin\bitcoin.exe in AppInit()      



************************
EXCEPTION: N5boost11filesystem316filesystem_errorE      
boost::filesystem::create_directory: Cannot create a file when that file already exists: "C:\Users\Admin\AppData\Roaming\Bitcoin"      
D:\Program Files (x86)\Bitcoin\bitcoin.exe in CMyApp::OnUnhandledException()      

So, I deleted that junction & the destination folder "D:\Bitcoin". Ran bitcoin client, bitcoin client created the "C:\Users\Admin\AppData\Roaming\Bitcoin"  location, then closed bitcoin client.

Tried to create the junction

Code:
C:\Users\Admin>mklink /J C:\Users\Admin\AppData\Roaming\Bitcoin D:\Bitcoin
Cannot create a file when that file already exists.

So bitcoin client and trying to create the junction are fighting each other resulting in, cannot use a junction.

Does anyone have any suggestions? Ran into this problem that found a solution?
Jump to: