Google Answers Logo
View Question
 
Q: Opening files in use by another program in WindowsXp ( Answered,   3 Comments )
Question  
Subject: Opening files in use by another program in WindowsXp
Category: Computers
Asked by: samson512-ga
List Price: $5.00
Posted: 21 Aug 2002 19:17 PDT
Expires: 20 Sep 2002 19:17 PDT
Question ID: 57189
I would like to know how to read a file that is already in use by
another program in WIndows. I've tried many text editors and even hex
editors, and even the command "type" in a dos box but they all give me
the error that the file is in use by another application.
Answer  
Subject: Re: Opening files in use by another program in WindowsXp
Answered By: blader-ga on 21 Aug 2002 19:53 PDT
 
Dear samson512:

To read this file, you will need to make a copy of it. Simply right
click the file,  and select "Copy." Then go to a different directory,
and right click and select "Paste." The original file will now be
copied into a file that is not in use.

If you have any questions about this, let me know.

Best Regards,
blader-ga

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:00 PDT
Ok, I've tried this and get an error saying "The file is being used by
another person or program . Close any programs that might be using the
file and try again" If i close the program that is writing to the
file, the file dissapears.

Clarification of Answer by blader-ga on 21 Aug 2002 20:03 PDT
What do you mean by "close the program that is writing to the file?"
What program is writing to the file?

Are you purposely writing to the file, and at the same time, you want
to be able to read the file?

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:05 PDT
Yes, I am purposely writing to the file, and I also want to be able to open it.

Clarification of Answer by blader-ga on 21 Aug 2002 20:07 PDT
Okay, thanks. One more question: "The file is being used by another
person or program . Close any programs that might be using the file
and try again."

^Is Windows giving you this message, or the program you are using to
write the file?

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:09 PDT
When i try to copy and paste to a different directory, that is the
message I get, so I guess that would be windows. I get about the same
message when using any other program to try and open it such as
notepad etc...

Clarification of Answer by blader-ga on 21 Aug 2002 20:12 PDT
Okay, thanks. I know you're checking on this question right now, so
give me an hour to research this some more. I've tested my own method
by saving a file using Mozilla from the internet. I can't move or open
the file, but it works when I copy it. I'm not sure why this method
doesn't work for you. Give me a bit of time, and I'll let you know
what I find.

Clarification of Answer by blader-ga on 21 Aug 2002 20:17 PDT
Does the program that is writing the file have to remain running? If
not, then you could ctrl-alt-delete, and "kill process" the program
that is writing. Then the file should remain. I don't know if you can
immediately open it, but the copy and paste trick should definitely
work now.

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:20 PDT
The program writing to the file does have to remain running. If i exit
the program normally the file dissapears. Also if I run taskmanager
and close/kill the program, the file also dissapears.

Clarification of Answer by blader-ga on 21 Aug 2002 20:24 PDT
Hm. Can you check the file size of the file? Does right clicking on
the file to view "Properties" work?

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:26 PDT
Yes that works, It tells me the file size etc...

Clarification of Answer by blader-ga on 21 Aug 2002 20:27 PDT
And the file size is greater than 0?

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:28 PDT
File size seems to report correctly, right now its about 40KB

Clarification of Answer by blader-ga on 21 Aug 2002 20:43 PDT
Okay, this a long shot, but:

Did you code the program you are using to write the file yourself?

If not, what program are you using?

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:45 PDT
I guess I should of said this earlier, but the program writing the
file is hl.exe , its Half-Life the game .

Clarification of Answer by blader-ga on 21 Aug 2002 20:47 PDT
Okay, that helps. What is the file you are trying to read? I need to
know this so I can duplicate this on my own computer.

Clarification of Answer by blader-ga on 21 Aug 2002 20:49 PDT
Also... when you mentioned that you used Task Manager to kill the
program, did you do this through the "Applications" tab or the
"Processes" tab?

Request for Answer Clarification by samson512-ga on 21 Aug 2002 20:51 PDT
Ok, the file that hl writes to gets a random name , but always start
with a T, and is always put in your root c:\ directory.

Clarification of Answer by blader-ga on 21 Aug 2002 21:01 PDT
When you mentioned that you used Task Manager to kill the
program, did you do this through the "Applications" tab or the
"Processes" tab?

Request for Answer Clarification by samson512-ga on 21 Aug 2002 21:05 PDT
I've tried both ways, and the file still dissapears.

Clarification of Answer by blader-ga on 21 Aug 2002 21:13 PDT
Okay. Let me install the half life demo and I'll see what I find.

Request for Answer Clarification by samson512-ga on 21 Aug 2002 21:24 PDT
By the way, this file is only created when you play multiplayer online .

Clarification of Answer by blader-ga on 21 Aug 2002 21:48 PDT
Okay... I am completely stumped out of ideas. I don't understand why
ending the process of hl.exe deletes the file as well. Here is a last
resort kind of deal:

You could try closing all programs except Half Life first. Then, shut
down your computer while Half Life is running. When you reboot, you
should get a scandisc reminder before Windows loads. You should also
have some "lost chains." Save the "lost chains." Depending on your OS,
find the saved lost chains ScanDisc created after it finished running.
One of them should be the file.

If this doesn't work (but it should!), then I am truly out of ideas.
>_<

Best Regards,
blader-ga

Clarification of Answer by blader-ga on 21 Aug 2002 21:50 PDT
P.S. The lost chain files should be named like "File0001.chk",
depending on your OS version. You'll have to more or less guess which
one it is based on the file size of the file in question.

Clarification of Answer by blader-ga on 21 Aug 2002 21:54 PDT
Also, I am referring to a "hard shut down", using your computer's
software button. This MAY cause damage to your computer, for which we
can not be held responsible, as stated in the Terms of Service.

Clarification of Answer by blader-ga on 21 Aug 2002 21:59 PDT
Oh, since you're using XP, the files should be found in directories
named "File0001", etc.
Comments  
Subject: Re: Opening files in use by another program in WindowsXp
From: gottafindit-ga on 21 Aug 2002 22:09 PDT
 
Norton utilities used to have a tool to close files that claim to be
in use by others.  There is a bit that gets set in the file header to
signal that the file is open. When you close the file(programatically)
that bit is reversed. If the program abnormally ends (or if the code
sucks) that bit gets left in the wrong state. Microsoft and or
Symantec will be able to help you.
Subject: Re: Opening files in use by another program in WindowsXp
From: sublime1-ga on 25 Aug 2002 18:34 PDT
 
samson512...

I don't understand why the file won't open for you.
I got interested in this question and downloaded
the HalfLife demo...found the t file in the C
directory, while the game was paused, and opened
it with MetaPad, a freebie NotePad replacement.

It had content about the game, like ammo and stuff.
What's interesting is, that it showed up as a 0 bytes
file in Windows Explorer, but had plenty of content...
at least 40kb, as you said.

I used the "Send To" function to open it. This can
be accomplished by creating a shortcut for, say,
Notepad, and placing it in the "Send To" folder
under the Windows directory. Then you can r-click
on the file of your choice, and from the "Send To"
drop-down menu, select Notepad, and it opens the
file.

Following your progress with interest....

sublime1-ga
Subject: Re: Opening files in use by another program in WindowsXp
From: sublime1-ga on 19 Sep 2002 22:01 PDT
 
samson512...

Well, I recently installed Windows XP, and now I know the
problem. Windows XP has security protocols in place to
prevent exactly what you're attempting to do, with the 
assumption that it's a hack attack.

These protocols are much stricter than in Windows 98, which
I was using before, and which allowed me to do it (see previous
comment). As for the file you're trying to write to, it's a
temporary file, designed to disappear when the game is closed,
much like the "copy" of a document file, which Word opens in
the same directory as the original, when you open and edit one.
It disappears when you save the new file and close it. This
prevents it from being lost, as the original is untouched until
the new copy is saved under the same name.

So if you really want to get to this file, you'll have to install
the game on a Windows 98 system.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy