This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: DeleteFile() Can't Handle Some Filenames with Multiple . (period)
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 23, 2013
09:22 AM
DeleteFile() Can't Handle Some Filenames with Multiple . (period)
I have an Install Script project for IS 2012 which I have taken over from another developer.
I have been asked to update the installer and several fiiles have been replaced by new files with different names.
I have an event handler to my script which calls DeleteFile() method from the InstallScript api
I have a problem, though, with the DeleteFile() function.
DeleteFile() can delete files named in this style -
Planoreport.js
or
storePOGs.js
But DeleteFile() is unable to delete files named like this -
jquery-1.7.2.min.js
We have several files named like this. It is a standard convention for javascript and css files so there is nothing unusal about the naming convertion but DeleteFiles() seems unable to delete them leaving some files deleted, others not deleted.
Is this a bug with DeleteFiles() ?
Alternatively, can anyone please suggest a workaround?
I tried wildcard and DeleteDir() as well but same problem.
Thanks in advance.
I have been asked to update the installer and several fiiles have been replaced by new files with different names.
I have an event handler to my script which calls DeleteFile() method from the InstallScript api
I have a problem, though, with the DeleteFile() function.
DeleteFile() can delete files named in this style -
Planoreport.js
or
storePOGs.js
But DeleteFile() is unable to delete files named like this -
jquery-1.7.2.min.js
We have several files named like this. It is a standard convention for javascript and css files so there is nothing unusal about the naming convertion but DeleteFiles() seems unable to delete them leaving some files deleted, others not deleted.
Is this a bug with DeleteFiles() ?
Alternatively, can anyone please suggest a workaround?
I tried wildcard and DeleteDir() as well but same problem.
Thanks in advance.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 24, 2013
09:07 AM
I would convert the path to a short name first, using LongPathToShortPath (svPathToExistingFile); I think I have done the same thing previously in my projects.