f2 icon indicating copy to clipboard operation
f2 copied to clipboard

Cannot modify the file name of a file starting with '.' using .* matching?

Open BAKAOLC opened this issue 1 year ago • 3 comments

Environment: Windows

Assuming there are several files in the same folder that are not hidden:

.01.png 01.png 02.png

So, using

F2 -f ".*" -r "{%02d}.png"

At this time, only the file names of 01.png and 02.png can be modified, and the file .01.png will not be renamed

Did I do something wrong?

BAKAOLC avatar Jul 25 '23 13:07 BAKAOLC

Any file starting with . is regarded as hidden. Use the -H flag to include hidden files.

ayoisaiah avatar Jul 25 '23 18:07 ayoisaiah

Okay, I can understand.

However, this may be a bit difficult for Windows users to accept, as the concealment of Windows is a separate attribute. Can we make a preset distinction or indicate this behavior in the document?

BAKAOLC avatar Jul 25 '23 18:07 BAKAOLC

You're right, hidden files are a different concept in Windows and we should not apply Linux conventions to Windows. I will consider changing the default behaviour in the next release

ayoisaiah avatar Jul 26 '23 07:07 ayoisaiah

https://github.com/ayoisaiah/f2/commit/28a9278e32faf209d96ffbc06d02f44f63f1a15e

ayoisaiah avatar Jul 09 '24 11:07 ayoisaiah