problem with GetLastWriteTime()

  • Thread starter Thread starter luca.gere
  • Start date Start date
L

luca.gere

i'm using funtion GetLastWriteTime in vb.net 2005 but for a file .asf
i have an error.
Also if i look le propriety of the file by Windows the last write time
is empty and i think this is the problem.
How can i resolve the problem ?
Thank you
Luca
 
luca.gere said:
i'm using funtion GetLastWriteTime in vb.net 2005 but for a file .asf
i have an error.
Also if i look le propriety of the file by Windows the last write time
is empty and i think this is the problem.
How can i resolve the problem ?
Thank you
Luca

It's helpful to always state what the error is that you get when you run
your code. Do you have full permissions to the file? The docs indicate
an UnauthorizedAccessException would occur in this case.
 
This is the error :

System.ArgumentOutOfRangeException was unhandled

Message="FileTime Win32 non valido.
Nome parametro: fileTime" ParamName="fileTime"
Source="mscorlib"
StackTrace:
in System.DateTime.FromFileTimeUtc(Int64 fileTime)
in System.IO.File.GetLastWriteTimeUtc(String path)

I have full permissions to the file.

Thank you.
 
Luca said:
This is the error :

System.ArgumentOutOfRangeException was unhandled

Message="FileTime Win32 non valido.
Nome parametro: fileTime" ParamName="fileTime"
Source="mscorlib"
StackTrace:
in System.DateTime.FromFileTimeUtc(Int64 fileTime)
in System.IO.File.GetLastWriteTimeUtc(String path)

I have full permissions to the file.

That's interesting. Run Chkdsk /f on the volume and try it again afterwards.


Armin
 
For me it depend that the file don't have the date of the last modify.
It is a video and it was acquired and it did not modified.
thanks.
Luca
 
Back
Top