Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
AnswerRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
AspDotNetDev4-Feb-10 11:43
protectorAspDotNetDev4-Feb-10 11:43 
GeneralRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
SCADirector4-Feb-10 13:51
SCADirector4-Feb-10 13:51 
AnswerRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
Dave Kreskowiak4-Feb-10 15:14
mveDave Kreskowiak4-Feb-10 15:14 
GeneralRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
SCADirector4-Feb-10 15:58
SCADirector4-Feb-10 15:58 
GeneralRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
Dave Kreskowiak4-Feb-10 16:42
mveDave Kreskowiak4-Feb-10 16:42 
GeneralRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
SCADirector4-Feb-10 16:54
SCADirector4-Feb-10 16:54 
GeneralRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
SCADirector9-Feb-10 5:12
SCADirector9-Feb-10 5:12 
AnswerRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
gjak18-Feb-10 0:24
gjak18-Feb-10 0:24 
Hi,
I have very similar problem.
I'm running FSW as a service and watch for the all events. Folder contains photos and when the new one dropped or changed/renamed/deleted we make some resizing and put results in two other unwatched folders.
The problem raise up when I try to download something from internet and as destination set the watched folder.
We using firefox and if we choose "Save image as" everything works ok, but if we have a link to photo and choose "Save link as" we run into problems.
First, there is issue with file locking. We try to solve it using System.IO.FileStream. If we get error we wait 1000ms and try again... I think you use similar logic in your FileReady.isFileReady. Sometimes file doesn't processed.
Next, sometimes we got firefox error (can't write destination folder). We try to use different options in filestream (readwrite, shared...) but with no success.
I think that solution might be making some type of log which contains file names, and process files later.

The strange thing is when we copy files to watched directory even from a source on a slow link everything works ok. Sync script runs on the same machine running FSW service (we pull files from distant folder and put them into local one watched by FSW)

Main problem is file locking issue and multiple events for the same file (created, deleted, created, multiple changed...) while downloading from internet using firefox (firefox crate destination file with size 0, .part file which is used as temp file while downloading, and finally probably copy .part into destination file when download finished into .part file). It happens regardless the size of file downloaded (needed time for downloading).

I'm interested in your logic you use in FileReady.isFileReady. Could you please give some hint about it?

Thanks
Goran
GeneralRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
SCADirector18-Feb-10 4:33
SCADirector18-Feb-10 4:33 
GeneralRe: FileSystemWatcher doesn't notice files downloaded to the watched directory via IE? Pin
gjak18-Feb-10 8:58
gjak18-Feb-10 8:58 
Questionip address Pin
mehrdad3334-Feb-10 6:38
mehrdad3334-Feb-10 6:38 
AnswerRe: ip address Pin
Ennis Ray Lynch, Jr.4-Feb-10 6:43
Ennis Ray Lynch, Jr.4-Feb-10 6:43 
AnswerRe: ip address Pin
Migounette4-Feb-10 6:47
Migounette4-Feb-10 6:47 
AnswerRe: ip address Pin
Richard MacCutchan4-Feb-10 8:51
mveRichard MacCutchan4-Feb-10 8:51 
QuestionVisual Studio 2008 C# / ASP.NET / MVC / LINQ Training Needed - AppDev? Pin
bdaoust4-Feb-10 5:55
bdaoust4-Feb-10 5:55 
AnswerRe: Visual Studio 2008 C# / ASP.NET / MVC / LINQ Training Needed - AppDev? Pin
Richard MacCutchan4-Feb-10 6:07
mveRichard MacCutchan4-Feb-10 6:07 
AnswerRe: Visual Studio 2008 C# / ASP.NET / MVC / LINQ Training Needed - AppDev? Pin
Ennis Ray Lynch, Jr.4-Feb-10 6:18
Ennis Ray Lynch, Jr.4-Feb-10 6:18 
QuestionImage Processing in c# Pin
dp.mscit4-Feb-10 5:40
dp.mscit4-Feb-10 5:40 
AnswerRe: Image Processing in c# Pin
Dr.Walt Fair, PE4-Feb-10 5:47
professionalDr.Walt Fair, PE4-Feb-10 5:47 
AnswerRe: Image Processing in c# Pin
Richard MacCutchan4-Feb-10 6:11
mveRichard MacCutchan4-Feb-10 6:11 
AnswerRe: Image Processing in c# Pin
Ennis Ray Lynch, Jr.4-Feb-10 6:44
Ennis Ray Lynch, Jr.4-Feb-10 6:44 
AnswerRe: Image Processing in c# Pin
dp.mscit5-Feb-10 18:36
dp.mscit5-Feb-10 18:36 
Questionfrequency measure Pin
Basudevkuet4-Feb-10 5:30
Basudevkuet4-Feb-10 5:30 
AnswerRe: frequency measure Pin
Dr.Walt Fair, PE4-Feb-10 5:44
professionalDr.Walt Fair, PE4-Feb-10 5:44 
AnswerRe: frequency measure Pin
Keith Barrow4-Feb-10 5:44
professionalKeith Barrow4-Feb-10 5:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.