Questions tagged [filenames]

A filename (also written as two words, file name) is a name used to uniquely identify a computer file stored in a file system. Filenames are a human-friendly label for the references or pointers that operating systems use to identify files within a file system.

A filename (also written as two words, file name) is a name used to uniquely identify a computer file stored in a file system. Filenames are a human-friendly label for the references or pointers that operating systems use to identify files within a file system.

483 questions
223
votes
4 answers

How to delete a file with a path too long to be deleted

I was working with some computer vision source code I found and didn't realize that it creates a cache file that has a VERY LONG name and now I can't delete the 2 of them. I tried to rename it to a shorter name but I can't do anything to the file, I…
Chris
  • 2,341
211
votes
8 answers

How to delete a file in Windows with a too long filename?

My wife has several files and folders that somehow ended up having filenames that have caused them to be undeleteable (can't be deleted) by normal means or via the command line. I believe the filenames are too long due to the depth of the folder…
user3048
  • 2,249
148
votes
2 answers

Windows 10 "Enable NTFS long paths policy" option missing

For some time, Microsoft has supported an option to remove the limit of 260 symbols for NTFS file name length. The web is full of articles, describing what should be done. Hit the Windows key, type gpedit.msc and press Enter. Navigate to Local…
100
votes
5 answers

What characters are safe in cross-platform file names for Linux, Windows and OS-X

Currently, I use a YYMMDD-NAME+PAGE name for most of my files. NAME has spaces converted to underscores. I'd like to use the YYYY-MM-DD date format, but I am not sure how to separate it from the name. A - would look strange if the name started with…
90
votes
37 answers

How to force Windows to rename a file with a special character?

I have a song that Windows can't play because there is a question mark in the name of the file. "Where Have All the Cowboys Gone?.ogg" // as an example So I try to rename it and Windows complains whether I try it in Explorer or from command…
codeLes
  • 1,852
86
votes
5 answers

What technical reasons exist for not using space characters in file names?

Somebody I know expressed irritation today regarding those of us who tend not to use spaces in our filenames, e.g. NamingThingsLikeThis.txt -- despite most modern operating systems supporting spaces in filenames. Are there technical reasons that…
Chris W. Rea
  • 10,978
76
votes
17 answers

How do I delete a folder which is nested quite deep and avoid "File name too long"?

Eclipse created a temp folder in one of the directories which is nested quite deep, e.g. dir1\dir1\dir1\dir1\... I am unable to delete this folder in Windows via Explorer, the del or rmdir commands, nor the Cygwin 'rm' command. How should I remove…
user39186
  • 1,113
67
votes
4 answers

What is the significance of Windows file names that have hex numbers in them like {ED7BA470-8E54-465E-825C-99712043E01C}?

When doing a backup of my Windows hard drive, I noticed some file names that had a bunch of seemingly random numbers in them. For example: .{ED7BA470-8E54-465E-825C-99712043E01C} Does that mean something special in Windows? What is the purpose of…
63
votes
4 answers

Find files filtered by multiple extensions

What is the correct syntax for: find . -type f -name \*.\(shtml\|css\) This works, but is inelegant: find . -type f -name \*.shtml > f.txt && find . -type f -name \*.css >> f.txt How to do the same, but in fewer keystrokes?
Dave Jarvis
  • 3,427
62
votes
5 answers

Why does `dir *.*` give me all files and folders?

When I run dir *.* it produces unexpected results. Even files and folders without any dot in their names are listed. For example C:\>dir *.* Volume in drive C is System Volume Serial Number is AC0A-29DA Directory of C:\ 14-03-2017 05:17 PM …
phuclv
  • 30,396
  • 15
  • 136
  • 260
57
votes
9 answers

Why can't I name a folder or file 'CON' in Windows?

In all versions of Windows, we are unable to rename a file or a folder name as CON without third-party file renaming software. Trying to do this in Windows 7 results in an error: The specified device name is invalid. Trying to save a file as…
hari
  • 642
52
votes
6 answers

What does the ~ mean in a file path?

What does the ~ mean in an absolute file path? I see this in the output of things like build scripts but the path does not exist.
blade34r
  • 529
41
votes
4 answers

How to diff file names in two directories (without writing to intermediate files)?

I am trying to do something along the lines of: diff `ls -1a ./dir1` `ls -1a ./dir2` But that doesn't work for obvious reasons. Is there a better way of achieving this (in 1 line), than this? ls -1a ./dir1 > lsdir1 ls -1a ./dir2 > lsdir2 diff…
bguiz
  • 2,141
37
votes
2 answers

Did a version of Windows ever behave this way?

Inspired by today's DailyWTF article. The author claims that a file C:\Program.exe would be executed when clicking on a shortcut to, for example, C:\Program Files\Doom 2\doom2.exe -nomusic. Supposedly, Windows first attempts to invoke C:\Program…
dpatchery
  • 681
30
votes
4 answers

How can I rename a file whose name is in itself a full path (e.g. begins with "g:\")?

Inadvertently, I have created a file named g:\filename.csv on Windows XP through a Python script. Note that g:\filename.csv is the filename. Actually it is saved on the F: drive. I can't rename it using command prompt (ren oldfilename newfilename)…
Vineet
  • 459
1
2 3
32 33