Check that Subfolder exists in %DESTPATH% folder

Is there a way to ensure the user has selected the correct %DESTPATH% folder
based on the existence of a subfolder ?
(so that if the %DESTPATH%\subfolder does not exist, the user will be re-prompted)

or any other way to achieve this ?

Thanks in advance

Copy and paste the following code into your Paquet Builder custom action editor:

<?xml version="1.0" encoding="utf-8"?>
<pbact><action GUID="415MI"><type>TFileExistsInfo</type><desc>Check if folder &quot;%DESTPATH%\Subfolder&quot; exists and store result into &quot;%TEST1%&quot;</desc><imgn>99</imgn><prop><ReturnVariable>%TEST1%</ReturnVariable><FileName>%DESTPATH%\Subfolder</FileName><CheckFolder>True</CheckFolder></prop></action><action GUID="3USBE"><type>TCheckValInfo</type><desc>If %TEST1% = 0 then</desc><imgn>87</imgn><prop><Variable1>%TEST1%</Variable1><Variable2>0</Variable2><Operator>Equals</Operator></prop></action></pbact>

image

Yes, I figured it out too.
Kudos for the fact that the “ask again the user for the destination folder”
uses automatically the same screen (and not in any new popup/screen)

Thanks again!

1 Like