-
Checking file
I need to make an app, where I check the revision number of the file. (Revision number is found right-clicking on the file -> Properties -> Summary -> Origin -> Revision number)
How do I get the revision number from the file? I am using VB.Net.
The application is simple and check that the revision number of the file is the newest release.
-
You want the VB.NET application itself to check its own revision number?
http://msdn.microsoft.com/library/de...rsiontopic.asp
-
1 Attachment(s)
No no, sorry for not expressing myself clear. I have a file e.g. located at c://Files/test.txt. If you right click on this file and select Properties -> Summary -> Revision number, you can see that I have set the revision number to "09092004". I wish to retrieve this information in my asp.net app. I have attatched the file.
-
I dont know if this is what your after but try these methods :
GetAttributes()
GetCreationTime()
GetLastAccessTime()
GetLastWriteTime()
Hope this helps.
-
I think the file has to be a vs.net file if you are using this. I have tried this code in my app:
Code:
Response.Write(IO.File.GetLastWriteTime(Server.MapPath("test.txt")))
but an error occurs saying:
Code:
Could not find a part of the path "c:\inetpub\wwwroot\Prisberegning2004\test.txt".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.IOException: Could not find a part of the path "c:\inetpub\wwwroot\Prisberegning2004\test.txt".
If I use this:
Code:
Response.Write(IO.File.GetLastWriteTime(Server.MapPath("Webform1.aspx")))
everyting works properly (and I have placed the file test.txt in the right folder)