Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Huh? file.copy /w variable

    I feel like I'm missing something here, I was fluent in AMS 4, now that I've moved to AMS 5 I am impressed but it is much more technical, which is good, but I need time to learn.

    Anyways, can you have variables in a file.copy? here is what I want to do:

    abc = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "file (abc.exe)|abc.exe|", "", "dat", false, true);

    File.Copy("abc"(this is a newer, different file from CD) , abcthis is the variable, can i not use it? do i need a string? , true, true, false, true, nil);

    Please help

  2. #2
    Join Date
    Jul 2000
    Location
    NY
    Posts
    332

    Lightbulb

    I stumbled and cursed through the same thing last night...

    The reason it's not working is the FileBrowse Dialog is storing the user defined path to a table called "abc" not a variable called "abc"

    It stores the path as record 1 in the table.

    So your second action should call abc[1] without quotes. This basically means get record 1 from the table abc.

    File.Copy(DestinationPath, abc[1], true, true, false, true, nil);

  3. #3
    Join Date
    Dec 2003
    Posts
    2

    Thanks

    Jeese, thanks how could I miss that, especially when you can have multiple files! I feel so bad, I should have known.:

    Thanks!

Posting Permissions

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