PDA

View Full Version : Deleting files after using Dialog.FolderBrowse to get their location


Gabis
12-19-2005, 05:51 PM
yea, what the topic says. im using a dialog.folderbrowse to have the user pick the folder the software is currently installed into. this only happens if the user has picked a location other than the default installation location. this is for an uninstall in which certain files are modified by the user after install, so installshield does not delete them on removal. Ive tried several syntax's to accomplish this, and im stumped. the variable that is returned from the dialog.folderbrowse is UninstallFolder. initially i just used folder.deletetree but there are subfolders within the main installation folder that should not be deleted. basically i need something like:

File.Delete(UninstallFolder\\eng.ini, false, false, false, nil);

quotations arent working, either on the whole("UninstallFolder\\eng.ini" or as (UninstallFolder"\\eng.ini" or (UninstallFolder\\"eng.ini" . this has to be possible, but im extremely new to all of it(like day 5) and so far ive been able to figure most eveything out either on my own or through older forum topics. i was unable to find something like this, but its late and i didnt look as hard as i could have. any help is appreciated as i continue to scour the forums for a similar topic. thanks alot.

daveinmb
12-19-2005, 10:22 PM
I am by no means a pro at this but I would probably take the easy way out by using AMS to copy the files to a different location, do a delete and then have AMS copy the files you don't want deleted back.

I am sure someone will come along with a much better solution but this would do the trick.

Gabis
12-19-2005, 10:54 PM
hmm, good idea. hadnt thought of that. definitely a good fix for now. thanks.