Ja7adR
Posts: 1
Joined: Tue Dec 24, 2019 9:56 am

how to copy file and folder from temp to application directory by select Radio button

hi
i want set radio button action for copy file and folder from temp folder to application folder with replace file and folders.
how to do it?

i try this but i don't understand: viewtopic.php?t=34691
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: how to copy file and folder from temp to application directory by select Radio button

Hello and welcome to Advanced Installer forums,

In order to achieve that, you can proceed as it follows:

Let's suppose that you have a file called asd.txt added as a temporary file:
tempFile.png
tempFile.png (139.63 KiB) Viewed 1274 times
In order to copy/move it from that folder to your "Application Folder", please go to "Files and Folders" page --> select "Application Folder" --> right click on the white area --> "New File Operation" --> "File Copy/Move". Your file operation should be configured as it follows:
fileOperation.png
fileOperation.png (12.52 KiB) Viewed 1274 times
where:

"Source File --> Name" field is the name of the file to be copied/moved and the "Source File --> Folder" is the folder where the file resides. As you can see in the screenshot above, the folder is set to "TempFolder" because that is the folder where our files is.

"Destination File --> Name" field is the new name of the file to be copied/moved and the "Destination File --> Folder" field is the folder where the file should be copied.

In addition to that, you have the condition field where you can condition the file operation based on your radio button.

In what regards the radio button selection, I suppose that you have in one of your dialogs a "Radio Button Group" control, which contains at least 2 radio button controls, as it follows:
radioButton.png
radioButton.png (197.11 KiB) Viewed 1274 times
As highlighted in the screenshot, this control has a property assigned to it. In our case, the property is called:

RADIOBUTTONGROUP_1_PROP

Inside of the Radio Button Group control, there are two radio buttons, which have two values:
radioButtonValue.png
radioButtonValue.png (189.9 KiB) Viewed 1274 times
The values, by default, are:

RadioButton_1

and

RadioButton_2

Based on this, you can use the value of the RADIOBUTTONGROUP_1_PROP to condition the file operation. For instance, if you want to copy the file only if the first radio button is selected, the condition field could look like this:
Condition.png
Condition.png (15.81 KiB) Viewed 1274 times
Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”