Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2005
    Posts
    2

    file.setattributes for variable file location

    Newbie here,

    I've searched but haven't found the answer. I'm having my users select the folder that they want to copy a file to using dialog.folderbrowse. Then copying the file using file.copy. I then need to change the readonly attribute after it is on their system. Can I use the result from dialog.folderbrowse in conjunction with the filename to locate the file? Please give me a sample of the code as I've tried several things without any luck. Here is what I have so far;

    result = Dialog.FolderBrowse("Please select a folder:", "{_SourceFolder}");
    StatusDlg.Show(MB_ICONNONE, false);
    File.Copy("AutoPlay\\Docs\\IIDD_W_Text.ppt", result, true, true, false, true, nil);
    StatusDlg.Hide();
    File.SetAttributes("??????", {ReadOnly=True});

    Thanks!!

  2. #2
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    Hi

    What you have will work - just the last line that needs adjusting.
    Notice also, that ReadOnly=true and not True

    Code:
    File.SetAttributes(result.."\\IIDD_W_Text.ppt", {ReadOnly=true});
    Hope that helps
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  3. #3
    Join Date
    Aug 2005
    Posts
    2
    Exactly what I was looking for. I knew I could use the result variable again, just couldn't get the right combination. Thanks

Similar Threads

  1. Audio Tracks Project
    By Michael in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 03-18-2004, 10:58 PM
  2. HOWTO: "Hide" Externally Referenced Files
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 03:19 PM
  3. Can search allow manual browse even if file is found?
    By RichardShaw in forum Setup Factory 5.0
    Replies: 2
    Last Post: 08-28-2000, 06:08 PM
  4. Replies: 0
    Last Post: 08-17-2000, 02:29 PM
  5. Same file, different location
    By Django in forum Setup Factory 6.0
    Replies: 1
    Last Post: 02-07-2000, 11:56 PM

Posting Permissions

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