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.
466
questions
221
votes
4
answers
625k
views
How to delete a file with a path too long to be deleted [duplicate]
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 ...
209
votes
8
answers
398k
views
How to delete a file in Windows with a too long filename? [duplicate]
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 ...
146
votes
2
answers
297k
views
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 ...
93
votes
5
answers
71k
views
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....
90
votes
37
answers
227k
views
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 ...
84
votes
5
answers
81k
views
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 ...
76
votes
17
answers
112k
views
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, ...
68
votes
4
answers
11k
views
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 ...
62
votes
5
answers
11k
views
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 ...
61
votes
4
answers
56k
views
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
...
56
votes
9
answers
78k
views
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 ...
51
votes
6
answers
95k
views
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.
39
votes
4
answers
35k
views
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 -...
37
votes
2
answers
3k
views
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.
...
30
votes
4
answers
2k
views
How can I rename a file whose name is in itself a full path (e.g. begins with "g:\")? [duplicate]
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 ...
29
votes
5
answers
14k
views
On Windows, what filename extensions denote an executable?
On Windows, *.exe, *.bat, *.cmd, and *.com all represent programs or shell scripts that can be run, simply by double-clicking them. Are there any other filename extensions that indicate a file is ...
28
votes
6
answers
36k
views
How can I create a zip / tgz in Linux such that Windows has proper filenames?
Currently, tar -zcf arch.tgz files/* encodes filenames in UTF, so Windows users see all characters spoiled in filenames which are not english, and can do nothing with it.
zip -qq -r arch.zip files/* ...
28
votes
7
answers
170k
views
How do I find and replace a character in filenames in Windows 7 using Explorer?
I want to replace all the underscore characters (_) with a space () in a filename.
How can I do this quickly, when I have lots of _ characters to replace?
28
votes
5
answers
130k
views
How to start/open a file/folder that contains space in its name through command-line?
I'm trying to use the start command in the command prompt to open files and folders, but I'm unable to open files and folders that contain space(s) in their name.
I have tried the following queries (...
28
votes
6
answers
46k
views
Windows Explorer sorting order for special characters?
What is the sorting order used in Windows Explorer?
I was specifically wondering what special characters sort after the alphabets?
As far as I can tell (test), all special characters seem to be ...
22
votes
4
answers
87k
views
How do I recursively list filenames (only) in DOS/Windows? [duplicate]
Possible Duplicate:
Get bare file names recursively in command prompt
I would like to recursively list all files in a directory, showing filenames only (without extensions and without the full ...
21
votes
3
answers
57k
views
How to extract the filename without the extension from a full path?
I'm trying to right my first bash script, and at one point a filename is passed to the script as $1. I need to extract the file name without the extension.
Currently, I'm assuming that all extensions ...
21
votes
1
answer
29k
views
What is naming convention for subtitle files?
I use VLC that automatically opens subtitles with same name as movie:
Movie: [Name].avi
Sutitles: [Name].srt
But i wonder how should i name subtitles if i have more than one.
20
votes
4
answers
89k
views
Windows 7 file name length limited to 129 characters
I'm trying to properly name MP3s and I hit some arbitrary length of 129 characters (not 128?). NTFS supports 255 characters in file names, how do I fix this?
Star Wars - 6 - Return of the Jedi - 2 -...
20
votes
4
answers
57k
views
Get bare file names recursively in command prompt
I ran into a little snag trying to get only the filenames (no extensions or file paths) recursively.This worked for me in the root folder:
dir /b
But when i added /s to scan recursively i also got ...
20
votes
1
answer
60k
views
How to prevent long file name error copying from an external drive?
I have an external hard drive with many files (800 GB). I want to copy the entire contents of the external hard drive to my local drive. get many errors about long file name or long file path. ...
19
votes
4
answers
16k
views
Which characters are invalid for an MS-DOS filename?
I'm writing a filename I/O procedure in x86-16 assembly language. It takes eight characters (I don't need to support long filenames) from the keyboard and prints them to an on-screen text input field.
...
19
votes
2
answers
12k
views
Windows explorer sees different file name from cmd
I just got a new computer, and put my old hard drive (which contained Windows) in the new computer to keep my old files. I was successfully able to remove the Windows directory from this drive, but I'...
18
votes
4
answers
100k
views
Create XLS or CSV from file names in folder on Windows?
I have a few hundred files in a folder on a Windows 7 machine. Is there a way to generate an XLS, or CSV file from the file names in the folder?
A text file is fine as well; Just looking for any ...
17
votes
7
answers
46k
views
Using Windows Explorer, how to find file names starting with a dot (period), in 7 or Vista?
I've got a MacBook laptop in the house, and when Mac OS X copies files over the network, it often brings along hidden "dot-files" with it. For instance, if I copy "SomeUtility.zip", there will also ...
17
votes
1
answer
36k
views
What does a blue filename in Windows Explorer mean?
I am viewing a network share where some filenames are in blue instead of black. I am using Windows 7.
This question mentions green filenames, which indicates encrypted file.
What does a blue ...
16
votes
3
answers
23k
views
How to delete file with this name on linux: -]???????q [duplicate]
Somehow a file named -]???????q got created on my terminal. I tried rm -f "-]???????q" (in double quotes), but it did not get deleted. (Error:: rm: invalid option -- ]). How do I delete it?
16
votes
3
answers
29k
views
Powershell Bug in copy/move/rename when filename contains [square bracket characters]?
Please pardon a noob question, but I've been completely baffled by this one.
I have a "depositor" directory where user-submitted files arrive, and have no control over the incoming file names.
I ...
15
votes
7
answers
13k
views
Linux copy to fat32 filesystem: invalid argument
When I copy files from an ext3 partition to a fat32 one using cp:
cp -R /ext3/stuff /fat32/partition/
I get invalid argument messages for all files with colons and question marks in.
Is there any ...
14
votes
6
answers
57k
views
How would I go about creating a filename with invalid characters such as :?> ?
I need to do create a file with a filename such as :>?, is this possible somehow? Windows stops it.
13
votes
8
answers
17k
views
Making BASH script `for` handle filenames with spaces (or workaround)
Whilst I have been using BASH for several years, my experience with BASH scripting is relatively limited.
My code is as below. It should grab the entire directory structure from within the current ...
13
votes
5
answers
29k
views
Filenames too long and Windows can't open the files
There's a bunch of files on a network drive, on a fairly deep path and the directories on most of of have long names. I think that these were originally created when someone copied & pasted the ...
13
votes
6
answers
28k
views
How to show file names instead of metadata title in VLC?
Metadata from various artists and music websites is a gigantic inconsistent mess and much harder to edit than filenames. To actually know which file is currently playing, I would like to see it in the ...
13
votes
4
answers
12k
views
Fix encoding of German umlauts in directories and filenames (ü = u╠ê and so on)
I have many zip-files where there are encoding errors for the German umlauts (äüöÄÜÖß). They show up in both the filename.zip as well as in the included directories and files like this:
Fünf = Fu╠ênf
...
12
votes
1
answer
35k
views
Put date into backup .tar.gz filename
I'd like to run a simple tar command to backup my website directory. It will run through cron, but I want to be able to put the time at which the backup was made as the filename. I don't really mind ...
12
votes
2
answers
3k
views
How can zsh be configured to autocomplete directory name with camelcase matching?
Eclipse and Resharper have a nice way of navigating files.
If I have the following folders (or files) in my current directory
MyReallyLongName
MyReallyLongAndFunName
MyReallyLongAndNotReallyFunName
...
11
votes
4
answers
13k
views
How can I scp when path and / or filename to copy has spaces?
I have in a remote remote_host a file like this:
\home\user\path with spaces\filename with spaces.ext
And I want to scp it to current dir .. How can I do that?
Thanks!
11
votes
5
answers
24k
views
While renaming, How can I disable Windows 7 highlighting the entire filename when I click'n'drag across part of it?
This is super annoying. If I highlight one word in the long filename, the entire filename gets highlighted (usually 1 millisecond before I tap delete or type something else). I just want Windows to ...
10
votes
5
answers
2k
views
What's the difference between filename and ./filename in Linux
What is the difference between filename and ./filename? Under what circumstances is one preferred to the other?
10
votes
3
answers
99k
views
How to create folder name or file name with special characters like \ / : * ? " < > | [duplicate]
My problem is that, I can not give name of my folder or file with special characters like \ / : * ? " < > | in windows based O.S.
This is very important for me, that giving name of file/folder ...
9
votes
4
answers
43k
views
Is it possible to rename files in a zip archive before extracting?
I pulled a zip file from the web which was packed on a system where filenames were encoded in a format my unzip program fails to read. Perhaps the file-system does not support those weird characters, ...
9
votes
3
answers
21k
views
Create 8.3 name for an existing directory
I have a machine that initially had 8.3 filename creation disabled. However, this was causing issues with some legacy software, so it was re-enabled. I'm wondering if it's possible to go back and "...
9
votes
2
answers
3k
views
Any option to change Windows XP default Copy Here naming from "Copy of {name}.{ext}" to "{name}.{ext}.copy"
Is there an option or tool that will allow me to change the default naming convention for files copied into the same directory in Windows (XP) and above.
e.g. from: Copy of {name}.{ext} to: {name}.{...
8
votes
2
answers
33k
views
Recovered Files with TestDisk, but File Names and Folder Structure is Bad
I used TestDisk to recover files from an internal hard drive which I connected externally to another PC. With PhotoRec all the file names are wrong and the original folder structure doesn't exist.
...
8
votes
7
answers
4k
views
Go to directory with unknown name
While unpacking a tarball, I encountered a directory which ls reports as "??????????????? ?????". Presumably, the name is not in unicode?
Anyway, I can't figure a way to access the folder.
I've tried ...