Zip files with filenames using spaces and no extension

I have been using this to zip up some icon files.

zip -u icons.zip *.*

But for a project I needed to rename some .png files to filenames using only spaces and no extension.

But now it does not zip those files?

(Engrandpa can do it, so there should be a way.

Any fix?

Well, first of all, this is a common pitfall. It is a typical MS-windows habit to get rid of:

don't use *.* if you mean *

Because *.* will only select filenames that contain a '.'
So, contrary to MS-Windows, it does what it says. :slight_smile:

so try this:

zip -u icons.zip *

Some background info:

'filename extensions' do not exist in Linux.

Not in the way that it exists in MS-Windows where it is a special entity.
(that is why *.* is valid on all files in MS-Windows, even on files without a '.' )

In Linux however, filenames with a dot in it are just filenames and a dot is just another valid character.

2 Likes