I am using a 3rd party app that is constantly writing to a text log
file. I would like to monitor that file with another app, but I keep
getting the dreaded "in use" error when I try to read the file.
I have tried using the "FileMode.Open, FileAccess.Read,
FileShare.ReadWrite" parameters of the FileStream Object, but still no
luck.
Anybody know of a solution?
Thanks! 4 1812
"Joe" <jo***@yahoo.com> schrieb I am using a 3rd party app that is constantly writing to a text log file. I would like to monitor that file with another app, but I keep getting the dreaded "in use" error when I try to read the file.
I have tried using the "FileMode.Open, FileAccess.Read, FileShare.ReadWrite" parameters of the FileStream Object, but still no luck.
Anybody know of a solution?
Open it in readonly mode is already the best you can do. If you still can't
open it, the other app locked it also for read operations. There is no way
around.
--
Armin
How to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
"Joe" <jo***@yahoo.com> schrieb I am using a 3rd party app that is constantly writing to a text log file. I would like to monitor that file with another app, but I keep getting the dreaded "in use" error when I try to read the file.
I have tried using the "FileMode.Open, FileAccess.Read, FileShare.ReadWrite" parameters of the FileStream Object, but still no luck.
Anybody know of a solution?
Open it in readonly mode is already the best you can do. If you still can't
open it, the other app locked it also for read operations. There is no way
around.
--
Armin
How to quote and why: http://www.plig.net/nnq/nquote.html http://www.netmeister.org/news/learn2quote.html
This will happen because the other application opens exclusively and locks
it. I have a similar problem with a 3rd party app, although I do not need
to read the file "on demand", I can sit a timer that keeps checking the file
to see if it is no longer in use.
"Joe" <jo***@yahoo.com> wrote in message
news:60**************************@posting.google.c om... I am using a 3rd party app that is constantly writing to a text log file. I would like to monitor that file with another app, but I keep getting the dreaded "in use" error when I try to read the file.
I have tried using the "FileMode.Open, FileAccess.Read, FileShare.ReadWrite" parameters of the FileStream Object, but still no luck.
Anybody know of a solution?
Thanks!
This will happen because the other application opens exclusively and locks
it. I have a similar problem with a 3rd party app, although I do not need
to read the file "on demand", I can sit a timer that keeps checking the file
to see if it is no longer in use.
"Joe" <jo***@yahoo.com> wrote in message
news:60**************************@posting.google.c om... I am using a 3rd party app that is constantly writing to a text log file. I would like to monitor that file with another app, but I keep getting the dreaded "in use" error when I try to read the file.
I have tried using the "FileMode.Open, FileAccess.Read, FileShare.ReadWrite" parameters of the FileStream Object, but still no luck.
Anybody know of a solution?
Thanks! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bill N. |
last post by:
Using VB .Net 2003 Standard Edition.
This simple form has a "File in Use" problem while the executable is running.
Created this simple program to make sure that I hadn't done something in my...
|
by: Tom Rodman |
last post by:
I want to embed a bash script inside the c program.
How could you do the below bash snippet in "c"?:
cat > /tmp/foo <<\__EOD_
all kinds of nasty stuff in here including single and double...
|
by: Dan H. |
last post by:
Hello,
What is the equivalent "string resource file" in c#?
And, is there a way to create a beep in C#?
Thanks,
Dan
|
by: Arpi Jakab |
last post by:
I have a main project that depends on projects A and B. The main project's
additional include directories list is:
...\ProjectA\Dist\Include
...\ProjectB\Dist\Include
Each of the include...
|
by: gk245 |
last post by:
I have something like this:
printf("Enter numbers: ");
scanf ("%i", &number);
If the user put in a bunch of numbers (like 4568), instead of just one
number, i know that you can extract the...
|
by: doctorhardik |
last post by:
hai all
when i try create new file using fopen function in php in "W" mode. it dose not create file.
Create test.php file in /var/www/html/ directory on linux machine.
past this simple code:...
|
by: Mahernoz |
last post by:
Hello Friends,
The JavaScript File exmplmenu_var.js contains the code... (for the
sake of brevity i am showing only that code which needs to be changed)
I am actually developing a menu using...
|
by: eastcoastguyz |
last post by:
I'm very new to RSS. I was given a URL that starts with "feed:". I
want to be able to open this and read in its content into a PHP
program to produce a report. I'm not interested in converting it...
|
by: TC |
last post by:
Hey All,
I'm trying to upload files via FTP and I'm using FtpWebRequest and
WebClient.
Unfortunately, I'm receiving a "Not Logged In" error.
I know that others have seen this as I've seen...
|
by: gflor16 |
last post by:
Here is the sample code:
For Each strFile As String In My.Computer.FileSystem.GetFiles("c:\")
lstData.Items.Add(strFile)
If strFile.ToString.StartsWith("c:\IO")...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |