I need to copy the contents of a folder which will be a the root of the CD drive from which my installer is running, into the target directory. The content will be OEM specific documentation files and folders, which cannot be built into my installer.
I have been trying:
Comment: copy ..\..\..\Documentation to target folder.
Create Folder $TARGETDIR$\Documentation
Set Variable DocPath to $EXEDIR$
Extract Parent Folder: DocPath
Extract Parent Folder: DocPath
Extract Parent Folder: DocPath
Copy Local Files $DocPath$\Documentation\*.* to $TARGETDIR$\Documentation\*.*
Apply Install (get result into variable SUCCESS)
But nothing is copied; I end up with an empty folder. I tried debugging, but EXEDIR is then set to the IA IDE executable's location. I copied a file from another location into this folder (via IA) successfully, so it appears not to be a permissions problem.
Can anyone see what I'm doing wrong, please?
Even if this was working, I believe it would only copy files but not directories. Is there a way to copy the directories without knowing their names in advance?
Thanks for any advice
Copying directories
Re: Copying directories
If you go above the directories you want to copy and do a *.* you can set it to get all subdirectories and it will recurse.
I've been using a single uncompressed folder mostly but the path variable you are looking for for the CD's root is I believe
$SFXPATH$
I've been using a single uncompressed folder mostly but the path variable you are looking for for the CD's root is I believe
$SFXPATH$
Re: Copying directories
If you copy the files in an uncompressed setup to a CD, EXEDIR and ROOTDIR should equal the CD/DVD drive when the setup is run.
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Copying directories
Hi Dunion and Andy,
Thanks for your replies. Apologies for my delay in replying. At last I have it copying files. I think my problem may have been due to an additional \ in the source path; I've now added a message dialog to my project, so I can at least see the values of the variables at runtime as I'm unable to test this by debugging.
However, despite using
Copy Local Files $DocPath$\*.* to $TARGETDIR$\Documentation\*.*
it is only copying files from the source path, not folders. So any suggestions would be welcome.
Nick
Thanks for your replies. Apologies for my delay in replying. At last I have it copying files. I think my problem may have been due to an additional \ in the source path; I've now added a message dialog to my project, so I can at least see the values of the variables at runtime as I'm unable to test this by debugging.
However, despite using
Copy Local Files $DocPath$\*.* to $TARGETDIR$\Documentation\*.*
it is only copying files from the source path, not folders. So any suggestions would be welcome.
Nick
Re: Copying directories
Dunion, you mentioned you could "you can set it to get all subdirectories". Did you really mean there's a setting for this? I'm just using Copy Local Files; setting the source and target folders appropriately, and using *.* in the source and target files fields. Did you do something different, to persuade it to copy folders recursively, please?
Re: Copying directories
You'll want to use XCOPY. Something like:
XCOPY info, syntax, paramaters:
http://ss64.com/nt/xcopy.html
Code: Select all
Run Program XCOPY c:\test C:\test2 /S /Ihttp://ss64.com/nt/xcopy.html
Andy Mills
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
InstallAware
Other Help:
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help - Press F1 in the InstallAware IDE.
Re: Copying directories
Andy, thank you, that's just what I needed.
It would have been useless if I'd not also been able to use InstallAware variables in the command-line parameters. For example I'm using
"$DocPath$\*.*" "$TARGETDIR$\Documentation" /S /I
which is working fine.
Nick
It would have been useless if I'd not also been able to use InstallAware variables in the command-line parameters. For example I'm using
"$DocPath$\*.*" "$TARGETDIR$\Documentation" /S /I
which is working fine.
Nick
Re: Copying directories
If you can suggest a way to make it not display a CMD window whilst doing the copies, that would be even better.
-
BobSchaefer
- Posts: 47
- Joined: Thu Sep 30, 2010 12:12 pm
Re: Copying directories
Look at the options in the Run Program window, there should be an option to not display the program output, which should do the trick for you.
Re: Copying directories
Stupid of me to miss it. Thanks Bob.
Nick
Nick

