Page 1 of 1

Cannot copy/move files with option include subfolders

Posted: Wed Sep 12, 2007 3:16 am
by mayita
Hi
Following situation:
I have to make a setup which copies a specified folder tree (or extract at least file/folder-information) from its reference location to a specified destination (can be a different server; specification via UNC-path and shares should be possible...); So I learned to make use of the copy/move local files command since files/folders already exist on the target system. Good. Unfortunalety I miss the "include subfolders" option with this command. I want to avoid the "install files" command because the source location may change and should be possible to specify it in the IA wizard. What do you propose? What command is the best? Or going back to DLL command?
Thanks in advance.
Eddy

Posted: Mon Sep 17, 2007 11:50 am
by sdeschenes
I agree. There should be a way of copying folders. Because for my product, I could have multiple folders that I need to copy and this requires a lot of string parsing for each folder that needs to be copied/installed.

Posted: Tue Sep 18, 2007 1:39 am
by mayita
I already found a solution: creating a file with xcopy commands on DOS level helps. In this cmd file I put a lot of variables, read it with #readall\\ which are replaced later with the write to textfile command. thae batfile will be excecuted with the run program command finally. Works perfectly :D .

Posted: Tue Sep 18, 2007 10:46 am
by sdeschenes
Can you post an example of your batfile?

Posted: Wed Sep 19, 2007 1:19 am
by mayita
Hi

First I provide the script code, attached you see the .txt file which will be converted into the .bat file at runtime.
"
Read from Text File #READALL\\$TEMPDIR$\\extract_from_basis_released.txt into Variable RUN_COPY_EXTRACT_FROM_BASIS_RELEASED (get EOF into EOF)

Write into Text File $TEMPDIR$\\extract_from_basis_released.bat from Value $RUN_COPY_EXTRACT_FROM_BASIS_RELEASED$ (at start of file)

Run Program $TEMPDIR$\\extract_from_basis_released.bat (WAIT)
".
Have fun.

File Attached:

extract_from_basis_released.txt