ayoisaiah / f2

F2 is a cross-platform command-line tool for batch renaming files and directories quickly and safely. Written in Go!
https://f2.freshman.tech
MIT License
866 stars 38 forks source link

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

Closed BAKAOLC closed 4 months ago

BAKAOLC commented 1 year ago

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?

ayoisaiah commented 1 year ago

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

BAKAOLC commented 1 year ago

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?

ayoisaiah commented 1 year ago

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 commented 4 months ago

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