File Permissions

Results 1 to 2 of 2

Thread: File Permissions

  1. #1
    Conrad Guest

    Default File Permissions

    What is the syntax for assigning file permissions on individual files and folder on a WinNT based server?<BR>I would like to accomplish this without using third party products. Most especially without using dlls.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: File Permissions

    Use the asp file system objects.<BR><BR>example:<BR><BR>&#060;% <BR><BR>dim fso<BR>dim some_file<BR>dim some_folder<BR><BR>const Normal = 0<BR>const ReadOnly = 1<BR>const Hidden = 2<BR>const System = 4<BR>const Archive = 32<BR><BR>set fso = server.createobject("scripting.FileSystemObject")< BR>set some_file = fso.getfile("c:autoexec.bat")<BR>&#039Here&#039s the important line of code <BR>some_file.attributes = (Normal + ReadOnly + Hidden + System + Archive)<BR><BR>set some_folder = fso.getfolder("c:windows")<BR>...

Posting Permissions

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