B4J Question #CustomBuildAction: Copy entire folder

jmon

Well-Known Member
Licensed User
Longtime User
Hi,

I need to include an entire folder with its subdirectories as part of my packaged application

I found this example for a single file:
B4X:
#CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ Charsets.properties

How to modify to copy a folder "AdditionalFolder" that would be located at the root of my project?
B4X:
#CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, ..\ temp\build\bin\ AdditionalFolder

I tried adding /S to robocopy arguments but not luck so far.

Thanks for you help
 
Solution
This command, from the default B4XPages template, synchronizes a complete folder:
B4X:
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
This will include sub folders:
B4X:
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files" /E

Erel

B4X founder
Staff member
Licensed User
Longtime User
This command, from the default B4XPages template, synchronizes a complete folder:
B4X:
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
This will include sub folders:
B4X:
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files" /E
 
Upvote 0
Solution

jmon

Well-Known Member
Licensed User
Longtime User
Great thank you.

This is the result of what I needed:
B4X:
#CustomBuildAction: After Packager, %WINDIR%\System32\robocopy.exe, "..\AdditionalFolder" temp\build\ /E
 
Upvote 0
Top