cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hkkim4
Level 3

Xcopyfile does not copy empty folder

I have Installshield 2014. and Xcopyfile does not copy empty sub folder, but I have to copy whole folder.

I try 

XCopyFile (resdir + "\\*.*", CurrentDate , COMP_NORMAL|INCLUDE_SUBDIR);

Does anyone help me?

Labels (1)
0 Kudos

(4) Replies
varul
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @hkkim4 

Please check the sample code shared in below help link, and try it works or not.

https://docs.revenera.com/installshield28helplib/LangRef/LangrefCopyFile_Example.htm#langref_appendixa_1278863047_1025393

https://docs.revenera.com/installshield28helplib/LangRef/LangrefINCLUDESUBDIR.htm?Highlight=INCLUDE_SUBDIR

You can also test it  by creating a test project and then try to add installscript Custom  Action to copy the folder. So that it will be easy to investigate.

0 Kudos

Hi, Thanks for answering but It doesn't work.

1. CopyFile()

: I want to copy entire folder in source but the function only copy files.

2. INCLUDE_SUBDIR

: It copies folder which has size. It also copies empty file but doesn't copy empty folder(0 Byte).

 

When I used /E option, I can copy all folder and files including empty folder at Command prompt in windows(cmd.exe)

For example) xcopy SOURCE_DIR TARGET_DIR /e

Is there any way I can copy including empty folder like /e option in installshield script?

0 Kudos
Revenera_Ian
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @hkkim4,

Thank you for your post.

You could try the suggestion from Ajay_Ladsaria in the post at the following link:

https://community.flexera.com/t5/InstallShield-Forum/Copy-files-into-installer-directory/m-p/53207

Please give this a try. Does this work for you?

Please let us know if you have any questions or concerns. Thanks!

0 Kudos

Thank You. 

I tried Ajay's solution, But I need to know the specify directory. 

But I want My Customer can copy the whole file whenever. 

MAIN

-- A(100bytes)

-- B(0bytes)

-- C(50bytes)

I want Copy whole folder.

0 Kudos