StreamWriter creation error

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi There,
Our application creates a file using StreamWriter. The application
creates the file in a unique path and deletes the folder after the
file is transferred to a designated location (a network drive or a
another folder). The problem that we are facing is that some times
(usually after more than 12000 to 18000 such file/folder operations
i.e., create folder, create file, transfer, delete) the StreamWriter
creation fails with "Could not find a part of the path" error. Here's
my flight log for the error. As becomes obvious from the log, the File
creation failed with the path error even after the directory was
created successfully. So my doubt is, does the .Net framework (or
Windows) cache folder creation? I read something akin to this here
http://blogs.msdn.com/bclteam/archive/2005/07/02/434689.aspx

2008/07/16 17:20:35:665 Directory Created: E:\Sessions
\20080716-052035665_Macro
2008/07/16 17:20:35:665 Directory Created: E:\Sessions
\20080716-052035665_Macro\Temp
2008/07/16 17:25:34:900 Could not find a part of the path E:\Sessions
\20080716-052035665_Macro\Temp\20080716-052035665.txt

Thanks in advance for all your responses,
Musthafa


.



Relevant Pages

  • Re: StreamWriter creation error
    ... Our application creates a file using StreamWriter. ... creates the file in a unique path and deletes the folder after the ... creation fails with "Could not find a part of the path" error. ... my flight log for the error. ...
    (microsoft.public.dotnet.framework)
  • Re: Help Required( Repost)
    ... folder unless it is given permisison to do so. ... StreamWriter sr=new StreamWriter; ...
    (microsoft.public.dotnet.framework.aspnet)
  • How do you programmatically create a file in the App_Data folder?
    ... I'm trying to write a file to the App_Data folder in my project using: ... Using sw As StreamWriter = File.CreateText ... It gives me an exception as: ... 'C:\Program Files\Microsoft Visual Studio ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How do you programmatically create a file in the App_Data folder?
    ... I need to know how to put it in the App_Data folder in my project. ... Using sw As StreamWriter = File.CreateText ... It gives me an exception as: ... path 'C:\Program Files\Microsoft Visual Studio ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: trying to check the creation date of a file
    ... I am trying to determine the creation date of files in a folder. ... I suggest you contemplate the following real-not-pseudo-code and then examine the relevant sections of the docs for os.stat, the stat module, and the time module. ...
    (comp.lang.python)