long-filenames

How to get around a 'by design' issue with Windows dir?

dir /b produces a nice file-only list dir /x produces a detailed listing (date, time, size, longname, shortname) if you combine the two (i. e. dir /b /x) the /x switch gets ignored. this behavior as per this page is by design. so if you ask for a simple list containing only of shortnames of files, redmont says it is against the rules ...

C#: Using Directory.GetFiles to get files with fixed length

The directory 'C:\temp' has two files named 'GZ96A7005.tif' and 'GZ96A7005001.tif'. They have different length with the same extension. Now I run below code: string[] resultFileNames = Directory.GetFiles(@"C:\temp", "????????????.tif"); The 'resultFileNames' return two items 'c:\temp\GZ96A7005.tif' and 'c:\temp\GZ96A7005001.tif'. But ...

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

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 the Coleccion[] array, ...

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

I have part of a build process that creates a hideously long path 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 chars). I'm not using anything other than ASCII in these names. The big problem is that t...

How to set long string(>260) in default FileName in SaveFileDialog?

I am using a SaveFileDialog and have to set long string(longFileName) in FileName. String longFileName is known at Runtime. If I set saveFileDialog.FileName = longFileName ; then I get System.IO.PathTooLongException. How can I do it? ...

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 extracted executable from another program, it works if I specify the directory as C:\Documents a...

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 FilePath[MAX_PATH]; Obviously, here i'm relying on the MAX_PATH constant which limits m...