Results 1 to 4 of 4

Thread: File attributes [RESOLVED]

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Resolved File attributes [RESOLVED]

    How do you get & set the a file's attributes? Namely I'm interested in the read-only property, for I've been trying to change the file's time stamp but it failed as the file was read-only and I previously had to change this manually.
    Last edited by krtxmrtz; Jun 20th, 2005 at 10:44 AM.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  2. #2
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: File attributes

    VB Code:
    1. SetAttr "C:\Test.txt", vbReadOnly
    To take the read only off:
    VB Code:
    1. SetAttr "C:\Test.txt", vbNormal

  3. #3

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: File attributes

    Quote Originally Posted by CVMichael
    VB Code:
    1. SetAttr "C:\Test.txt", vbReadOnly
    To take the read only off:
    VB Code:
    1. SetAttr "C:\Test.txt", vbNormal
    Thanks! Is it possible to check the attribute too? Just to avoid unnecessarily setting it to normal when it is already so.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  4. #4

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: File attributes

    Well, I've just run into the instruction "GetAttr". Forget my previous post.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

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