Results 1 to 5 of 5

Thread: Checking file

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

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

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    You want the VB.NET application itself to check its own revision number?

    http://msdn.microsoft.com/library/de...rsiontopic.asp

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    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.
    Attached Files Attached Files

  4. #4
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    I dont know if this is what your after but try these methods :

    GetAttributes()
    GetCreationTime()
    GetLastAccessTime()
    GetLastWriteTime()

    Hope this helps.

    Parksie

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width