Wireshark-users: Re: [Wireshark-users] Exporting objects with invalid default filenames
Jeff Morriss wrote:
> Mark G. wrote:
>
>>> -----Original Message-----
>>> From: Stephen Fisher
>>> Sent: Tuesday, October 23, 2007 8:29 PM
>>>
>>> I could not think of a really good way to handle these
>>> filenames thatare unsavable when I implemeneted the export
>>> object feature. Were you hoping to save all of the objects
>>> with filenames that increment or just the ones that are
>>> based on HTTP GET requests that cannot be saved with
>>> their HTTP GET filenames?
>>>
>> Either way would work. I think it would be simpler and
>> more intuitive to only use an incremental filename when
>> the exporter encounters a file with an invalid default
>> filename. I think an _ideal_ implementation would be to
>> provide a checkbox enabling the user to specify whether
>> he wants all exported objects to use the incremental
>> filename, or only the objects whose default filenames
>> are invalid.
>>
>
> Grip (a CD ripper for Linux/*NIX) has a configuration item that lists
> characters that it is not allowed to put into file names--if any of
> those letters appear then it deletes them (or replaces them with a space?).
>
> Since it's primarily Windows that should have this problem (AFAICR most
> *NIXs allow anything other than "/" in a file name) it should be easy
> enough to find a list of prohibited chars.
>
> That would result in file names as close to the original as possible.
> _______________________________________________
>
In W2K or later, there is the API call PathCleanupSpec()
(http://msdn2.microsoft.com/en-us/library/bb776472.aspx) that will
remove invalid characters according to the rules specified for the
target filesystem.
--
Regards,
Graham Bloice