Indigo Rose Software
  #1  
Old 09-24-2003
Desmond's Avatar
Desmond Desmond is offline
Indigo Rose Staff Member
 
Join Date: Jul 2003
Posts: 628
Grin Setting File Attributes For More Than One File

Spanning Content Across Multiple CD's

Setting File Attributes For More Than One File

Document ID: IR10009
The information in this article applies to:
  • AutoPlay Media Studio 5.0 Professional Edition

SUMMARY

This article describes how to set the attributes of multiple files at the same time.

DISCUSSION

AutoPlay Media Studio 5.0 has a File.SetAttributes action to set the attributes of a file. If you want to set the attributes of many files at once, you need to perform that action multiple times. An easy way to do this is to store the list of files in a table, and then cycle through that table using a for loop. Each pass through the loop would set the attributes for one of the files.

An easy way to create a table full of file paths is to use the File.Find action. The File.Find action returns a table containing a list of all the files which match a specific pattern.

As an example, let's set all of the .exe files in the root folder of the C: drive to read-only:

  1. Insert the following script into an event in your project:
    files_to_change = File.Find("C:\\","*.exe");

    -- loop through the files_to_change table

    -- and set each file's attributes one at a time

    for index, filename in files_to_change do

    File.SetAttributes(filename,{ReadOnly=true});

    end

MORE INFORMATION

For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:

  • Program Reference | Actions | File | File.SetAttributes

KEYWORDS: Find, Attributes, Read


Last reviewed: September 24, 2003
Copyright © 2003 Indigo Rose Corporation. All rights reserved.
__________________
Setup Factory 8.0 comes with over 250 actions so you can create smaller, faster and more intelligent software installers than ever before.

WebHelp Guides: AMS | MSIFACT | SUF | TU | VP
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On



All times are GMT -6. The time now is 04:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software