Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2007
    Posts
    4

    Using variables for an unknown path

    I am trying to copy a file from my disc by pressing a button to a folder in my program files. I want to use a variable for my harddrive as if the drive letter is unknown. I dont want to repeat the command C, D,E, F, G, etc.

    what is wrong with the command below it does not work when I use it?

    File.Copy("<Folder>\\<file>", "%systemdrive%\\Program Files\\<Folder>\\", true, true, false, true, nil);

    However it does work when I use "C:\\Program Files\\<folder>\\

  2. #2
    Join Date
    Nov 2006
    Posts
    64
    if the file you want to copy is on the same drive as your app, Insted of %Systemdrive%, try _SourceDrive.. this might help

    also just in case it helps,
    _SourceFolder - to use the same folder as the app uses
    _ProgramFilesFolder - self explanatory!
    Last edited by 4090987414711; 06-14-2007 at 05:38 PM.

  3. #3
    Join Date
    May 2007
    Posts
    4
    Thank you for the fast reply, but that is not working for me either.
    How ever my original command works through SFX files. So for right now I will run an SFX file in silent mode through Autoplay. Again, Thank you for your help.

  4. #4
    Join Date
    Nov 2006
    Posts
    64
    No problem

    I just wish I could have helped with something that worked!

  5. #5
    Join Date
    May 2007
    Posts
    4
    Thank you, yes I would rather run commands directly through autoplay than use 3rd party programs to complete my desired instructions.

Similar Threads

  1. Replies: 2
    Last Post: 11-19-2003, 03:54 PM
  2. INFO: Setting Environment Variables
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 10-10-2002, 12:07 PM
  3. How do I add to my PATH statement at install?
    By Tnygaard in forum Setup Factory 6.0
    Replies: 3
    Last Post: 05-27-2002, 01:38 AM
  4. PATH environment variable
    By RDodson in forum Setup Factory 6.0
    Replies: 4
    Last Post: 02-27-2002, 12:17 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