5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windows で先頭に"."が付くファイル名に変更できない時の対策

Posted at

名前を変えようとすると

Windowsのエクスプローラーでファイルの先頭に"."を付けて名前を変えようとすると、「ファイル名を入力してください。」というエラーが表示されます

image.png

開発者であれば .gitignore など、頻繁に遭遇する条件だろうけど、10年以上前から地味に悩んでいても、未だに改善されないと思ってました

実はこれにはワークアラウンドがあって、末尾にも"."を付けると、どういう訳か末尾の"."が削除されて先頭に"."が付いた状態で名前変更ができるのでした

解決手順

.editorconfig. と本来の名前の後に "." を入れます
image.png

警告画面には [はい] をクリックします
image.png

なんと、.editorconfig にかわり、目的のファイル名になりました
image.png

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?