mIRC Home    About    Download    Register    News    Help

Print Thread
#37657 21/07/03 10:42 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
why can't i write to an ini file when it's in use?

#37658 21/07/03 12:44 PM
Joined: Dec 2002
Posts: 127
F
Vogon poet
Offline
Vogon poet
F
Joined: Dec 2002
Posts: 127
afaik you can't write to any file while it's in use.


------
deep down, i'm really superficial.
#37659 21/07/03 08:08 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
i can in text files for example

#37660 21/07/03 08:12 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
No you can't. Just because, for example, notepad has "file.txt" open doesn't mean file.txt "is in use". If the file is in use, you can't write to it.

#37661 21/07/03 08:29 PM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
i can, just checked that..

#37662 21/07/03 08:48 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
when a file is in use it cant be delete without the assistance of command prompt.


new username: tidy_trax
#37663 21/07/03 09:02 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Quote:
i can, just checked that..


If a file is being read/written to by a piece of software (say fopen for exaple in a program language) is cannot be modified or deleted.


-KingTomato
#37664 21/07/03 09:03 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
im talking about if the thing you are trying to delete is in processes/applications in task manager.


new username: tidy_trax
#37665 21/07/03 09:28 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
that may be tryue, but i have a text file (a.txt) and i then run a program (b.exe) that opens the text file and prepares it for writing, though the a.ttx isn't in the task manager it still cannot be deleted/modified.


-KingTomato
#37666 21/07/03 09:29 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I'm tired of you talking about things you know nothing about, therefore I'm going to prove to you and everyone that you have no idea what you are talking about. Download www.codemastr.com/lock.exe. Run the exe. It will create an empty file in C:\mirc called "testfile.txt". Now type /run notepad testfile.txt in mIRC... guess what happens?
"The process can not access the file because it is being used by another process" So how about you stop making up your BS and when someone tells you something, don't comment on things you know nothing about. If you don't like the answers you are given (which are correct answers) then don't bother answering the question. Oh and if you want to see how simple it is to do this thinking maybe I did some "tricks" to make it cause that error, all I did was call the standard Windows CreateFile function.

#37667 22/07/03 05:38 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
/write file.txt text
/run file.txt
/write file.txt text2
there is no error and after u did it reopen the file and u will see
text
text2


#37668 22/07/03 05:48 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
The file isn't in use at the time though. mIRC does the same with log files that you have open. You open a log from an active channel and while the file is actually opening mIRC will display error messages in Status. Once Notepad or Wordpad has finished opening the file, mIRC can start recording again, and infact does. Wait a few minutes, close the log file, open it again and most of the recent events will have been added.

#37669 22/07/03 05:53 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
what do u mean by "in use" ? isn't when u open the file it's in use ?

#37670 22/07/03 06:29 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Not as such. A file is in use only when being written to, read from, opened or closed but not if it's just sitting there doing nothing - as far as I know anyway.

#37671 22/07/03 06:48 AM
Joined: May 2003
Posts: 730
S
ScatMan Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
uh ok
thx


Link Copied to Clipboard