QUOTE(blueparukia @ 21 Jul, 2007 - 10:32 PM)

Now, I know you say you will not do my homework, well, this is not homework, but I still have no idea what I'm doing.
I have tried this in VB and in Batch, and C++ is the only language I can think of that may be able to do this. (Batch probably can, but I don't know it properly).
On my friends computer, he has a read only drive, (X:\) with a .kix file on there. Well, he wants to modify the file so it logs his brothers movements on the PC. I programmed that with KIXtart, but now we need to replace the file. As the drive is read only, I can't do it. I have the replacement on my USB drive (F:\)
So if anyone who knows C or C++ could make a file that will do it, I would be greatly appreciative.
I want to replace X:\stu\student.kix with F:\student.kix
Also, if you think this belongs elsewhere, mods fell free to move.
Thanks
BP
Short answer:
YOU CAN'T.
Long answer: The filesystem is locked by the OS. It will not let you write to that drive under any circumstances. What you can
try and do is write a program that writes the log to the file, and only makes the FS
appear read only. Of course, to make the illusion
work, you'll have to write the program to prohibit
every other program on his PC from writing to it either. And even then... The OS might still freak on you.