View Full Version : Search for an existing file and delete if exists
Ashley
12-11-2012, 04:16 PM
I am new to SetupBuilder and I am wondering how to create a script that will ceck to see if a specified file exists in a certain location. If a file with that same name exists, delete the file and copy over a file from a different location to that location. If the file does not exist, copy the file to that location.
Any help would be greatly appreaciated!
(I have SetupBuilder 7)
linder
12-12-2012, 09:49 AM
Ashley,
No problem. See the attached code-snippet.
If the file LICENSE.LIC does exist in C:\Program Files\CoolApp\Modules then the installer will delete the file. The next step is to copy LICENSE.LIC from a network drive over to C:\Program Files\CoolApp\Modules
BTW, here is an interesting network drive (for UAC operating systems) reading:
http://www.lindersoft.com/forums/showthread.php?t=31410
Does this help?
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
--Helping You Build Better Installations
--SetupBuilder "point. click. ship"
--Create Windows 8 ready installations in minutes
--Official Comodo Code Signing and SSL Certificate Partner
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.