Questions tagged [long-filenames]

Long filenames can present compatibility or interoperability problems for operating systems and software with character length restrictions.

Overview

Long filenames can present compatibility or interoperability problems for operating systems and software with character length restrictions.

See also

68 questions
286
votes
15 answers

How to add a string to a string[] array? There's no .Add function

private string[] ColeccionDeCortes(string Path) { DirectoryInfo X = new DirectoryInfo(Path); FileInfo[] listaDeArchivos = X.GetFiles(); string[] Coleccion; foreach (FileInfo FI in listaDeArchivos) { //Add the FI.Name to…
Sergio Tapia
  • 40,006
  • 76
  • 183
  • 254
84
votes
3 answers

Does MAX_PATH issue still exists in Windows 10

Can someone please tell us/me if the MAX_PATH issue still exists in (the technical preview of) Windows 10. And if it exists: How many characters can a path and an individual file name have?
dkeck
  • 1,072
  • 1
  • 8
  • 13
36
votes
3 answers

Convert long filename to short filename (8.3) using cmd.exe

I am trying to convert a long filename to a short filename (8.3) on Windows. A batch-file with a command line argument works as intended: short.bat: @echo OFF echo %~s1 calling short.bat C:\Documents and Settings\User\NTUSER.DAT returns…
user1251007
  • 15,891
  • 14
  • 50
  • 76
19
votes
5 answers

How do I create then use long Windows paths from Perl?

I have part of a build process that creates a hideously long paths in Windows. It's not my fault. It's several directories deep, and none of the directory names are abnormally long; they're just long and numerous enough to make it over MAX_PATH (260…
brian d foy
  • 129,424
  • 31
  • 207
  • 592
15
votes
4 answers

How can I convert a Windows short name path into long names within a batch script

I am writing a Windows batch script, and I have an argument or variable containing a path that uses short 8.3 names. The path might represent a file or folder. How can I convert the 8.3 path into a long-name path? At a minimum I would like to be…
dbenham
  • 127,446
  • 28
  • 251
  • 390
12
votes
1 answer

How to enable "Long Path Aware" behavior via manifest in a C++ executable?

I'm trying to follow Microsoft documentation to lift MAX_PATH file path restriction in APIs under Windows 10. It says: You can also enable the new long path behavior per app via the manifest:
c00000fd
  • 20,994
  • 29
  • 177
  • 400
10
votes
2 answers

How to handle OSError: [Errno 36] File name too long

When handling the errors that occur when trying to create an existing file or trying to use a file that doesn't exist the OSErrors that get thrown have a subclass (FileExistsError, FileNotFoundError). I couldn't find that subclass for the special…
Max Matti
  • 352
  • 1
  • 4
  • 17
9
votes
3 answers

C++ WinAPI: handling long file paths/names

I'm looking at handling longer file paths in my windows application. Currently, I have a text box (edit box) in which a user can type an absolute file path. I then read that typed file path, using GetWindowText, into a string declared like so: TCHAR…
user353297
  • 736
  • 1
  • 7
  • 13
9
votes
3 answers

Long path/filename in windows makes write.table() error out in R

In R, I was using write.table() to write a file into a location embedded in directories with long names. But it errors out as below: Error in file(file, ifelse(append, "a", "w")) : cannot open the connection In addition: Warning message: …
smz
  • 263
  • 4
  • 11
7
votes
2 answers

Is there a workaround for the filename length limit in encfs?

I use Dropbox with encfs. The problem is that my host supports only 256 characters in a filename, hence encfs supports only ~190. Is there a way to circumvent that without reinstall and increase limit for the host filesystem? I am primarily using…
math
  • 8,514
  • 10
  • 53
  • 61
7
votes
4 answers

How to get long filename from ARGV

I want to make a tool that takes some filenames as parameters, but when I use this code: ARGV.each do|a| puts "Argument: #{a}" end and I use drag and drop or "send to" in Windows, I get the short filename. So a file like "C:\Ruby193\bin\test\New…
peter
  • 41,770
  • 5
  • 64
  • 108
6
votes
2 answers

How do I unmangle Windows filenames in Java?

From Java, I'm extracting an executable into a location specified using File.createTempFile(). When I try to run my executable, my program hangs when it tries to read the first line of output. I have discovered that if I try to run the same…
skiphoppy
  • 97,646
  • 72
  • 174
  • 218
5
votes
3 answers

Visual Studio 2022 Not Generating "GeneratedMSBuildEditorConfig.config"

I was trying to debug the AWS SystemsManager source code yesterday to try and track down the long delay it causes in cold booting my ASP.NET Core 6 apps. I didn't get anywhere, but during that time it was throwing errors about generated editor…
Gup3rSuR4c
  • 9,145
  • 10
  • 68
  • 126
5
votes
1 answer

Why can't .NET detect directories with long file paths?

I can't enumerate the contained files in a directory if the full path to those files exceeds 260 chars. The following code shows the problem: void TestLongPath(DirectoryInfo testDirectory) { if (testDirectory.Exists) { try { …
Ebonair
  • 221
  • 1
  • 11
5
votes
2 answers

Git 'filename too long' error on OS X

I have a directory that is tracked by git on linux and I copied it to mac OS. On git status multiple files are untracked because of a filename: File name too long error. One filename (with its relative path) is 393 characters. Isn't there a limit…
1
2 3 4 5