secure a Bluetooth connection

I did a big code 1 function of it to connect via Bluetooth device between arduino and a PC but I could also connect with a mobile or any else device.. so I want to put a password of connection to arduino device . so I thought to create a txt file on HDD of a pc in a default location then open the file with default text 0000 I will ask the user using tera term to inter a password and the compare it with the password in the file if true it will flag true and inter the code. if not match it will flag false and out the code... also he can change the password by clearing the file and rewrite it or recreate it with new password after asking about the old password but the problem that I don't know how to create a txt file on HDD >>> and I don't want an SD I want a HDD and I don't care about the default location will not be the same between PC and android because I want it to work on pc... thank you

I think you should learn Python (or so) to get the PC side right. Creating files from a terminal program the way you described (or better as I understood your story) is not supported as far as I know.