problem with GetLastWriteTime()

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
 
F

Family Tree Mike

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.
 
L

Luca Gere

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.
 
A

Armin Zingler

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
 
L

Luca Gere

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top