cjs
21st October 2003 19:46 UTC
Un-installer: Possible to delete *.* but leave ONE file?
I am trying to leave one file when un-installing the "install" line looks like:
file "p:\micad\*.mdb"
^^ this line adds alot of mdb files, typing out each one manually would waste alot of time
I need to leave one particular .mdb file
I tried SETFILEATTRIBUTES readonly
but the uninstaller still wipes the file.
any help?
Thanks.
-chris
kichik
21st October 2003 19:48 UTC
You can find the files one by one using FindFirst, FindNext and FindClose. If the file's name isn't the one you want to keep, delete it.
cjs
21st October 2003 20:15 UTC
I know what the files name is, but is there an EXCLUDE option for keeping one file whilst deleting all others?
kichik
21st October 2003 20:44 UTC
You can do it with the Delete instruction alone. Use the method I have described above.
mrtech
21st October 2003 21:43 UTC
you can also try moving the file to your temp directory, deleting everything and then putting it back.
Just an idea?
rsegal
23rd October 2003 20:24 UTC
I'm creating a program to do something very similar for the installer. You can read details on it here.
http://forums.winamp.com/showthread....hreadid=150770
I'll look into writing an equivalent uninstaller version as well.
Jay
25th October 2003 03:21 UTC
possibly a quicker way would be to open the file in question and then delete the contents of the directory then close the file in question.
Haven't tried this myself though.