tag:blogger.com,1999:blog-22120968.post4625180829636149164..comments2017-07-14T11:12:26.814-04:00Comments on Jon Schneider's Tech Blog: Leading/Trailing space characters in filenamesJonathan Schneiderhttps://plus.google.com/109465809713280435321noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-22120968.post-54879217420909183192016-03-31T04:26:30.890-04:002016-03-31T04:26:30.890-04:00The Windows explorer does not allow leading/traili...The Windows explorer does not allow leading/trailing spaces, but the Windows shell does seem to allow leading whitespaces.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-17478631590681152452016-01-10T17:37:27.325-05:002016-01-10T17:37:27.325-05:00@Curtiss, glad you got the issue tracked down! Tha...@Curtiss, glad you got the issue tracked down! That must have been a bizarre one to troubleshoot.Jonathan Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-9519474382001189212016-01-10T13:39:32.224-05:002016-01-10T13:39:32.224-05:00Interesting.
I have a client that I believe is e...Interesting. <br /><br />I have a client that I believe is emailing &quot;.rar &quot; files as attachments instead of &quot;.rar&quot; files. But outlook 2013/windows 10 seems to just see them as rar files, with the little yellow &quot;I&#39;m something that needs to be unzipped&quot; icon. <br /><br />The reason I think there is a space at the end is that I have ftp software that automatically checks this mailbox via pop3 for files matching *.rar, and it doesn&#39;t find files. But if I change that file mask to *.rar*, the automated ftp task finds the client&#39;s files. In the task&#39;s destination folder, the file names do not have the trailing space. <br /><br />if I send my own test file, which I know is definitely named test.rar, the ftp software works using the *.rar file mask. <br /><br />So my ftp software is seeing the trailing space at the end of the client filename, but windows is either not seeing it or choosing to ignore it. My guess was that they are creating the file in a non-windows environment (I&#39;m not actually allowed to speak to the client to ask them) Curtisshttps://www.blogger.com/profile/05725185516811588341noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-37970911833209859502012-01-06T12:54:30.808-05:002012-01-06T12:54:30.808-05:00@Anonymous, it still seems to work for me. On my ...@Anonymous, it still seems to work for me. On my Windows 7 PC, I can use Notepad to create a new file and save it as &quot;c:\temp\ t.txt&quot; (with the leading spaces before the filename); when I browse the c:\temp directory in the command prompt or in Windows Explorer, I can see that the file is present with the leading spaces in the filename.Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-71891040972301601472012-01-06T12:19:07.368-05:002012-01-06T12:19:07.368-05:00I can&#39;t get leading spaces to stick in Windows...I can&#39;t get leading spaces to stick in Windows 7 (I use them in XP for an application) Any ideas?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-22120968.post-86183305363624072992010-05-27T12:09:26.117-04:002010-05-27T12:09:26.117-04:00@bizzybody:
Hmm. On WinXP, from a cmd.exe comman...@bizzybody:<br /><br />Hmm. On WinXP, from a cmd.exe command prompt, I was able to do a:<br /><br />&gt; dir &quot;* .txt&quot;<br /><br />and it *did* return just the files with a trailing space and a .txt extension. This same search string didn&#39;t work for me in Windows Search, though.Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-2745622317401151772010-05-27T06:58:43.987-04:002010-05-27T06:58:43.987-04:00Windows supports trailing spaces in names too. I&#...Windows supports trailing spaces in names too. I&#39;ve been using File Renamer to clean up several hundred file&#39;s names. Now I have a bunch with a trailing space. I can just trim 1 character at 0 from the end with File Renamer, but first I need a way to search for only files with a trailing space in the name so I can select them all to drag to Renamer. Searching for * .pdb Doesn&#39;t work. With the space it just lists ALL the folders and files under the folder I&#39;m searching within.bizzybodyhttps://www.blogger.com/profile/11004429807828474634noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-2288249401187454782009-04-17T07:25:00.000-04:002009-04-17T07:25:00.000-04:00@Barbara, great, I'm glad this was helpful!@Barbara, great, I'm glad this was helpful!Jon Schneiderhttps://www.blogger.com/profile/05718316809087214442noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-59443217062838165252009-04-17T04:31:00.000-04:002009-04-17T04:31:00.000-04:00Hello again,
I found the solution thanks to anoth...Hello again,<br /><br />I found the solution thanks to another of your posts :<br />http://blog.jonschneider.com/2006/06/c-string-literals-and-character.html<br /><br />Using the @"some path" pattern solves the directory listing !Barbara Posthttps://www.blogger.com/profile/17140293893479895573noreply@blogger.comtag:blogger.com,1999:blog-22120968.post-57522384171525220262009-04-17T04:23:00.000-04:002009-04-17T04:23:00.000-04:00Hello,
Nice article (thanks for showing us the "-...Hello,<br /><br />Nice article (thanks for showing us the "-Q" ls flag).<br /><br />I'm currently having troubles with these file/folder names and c# code that lists directory content on a BSD/Linux share. Directory.GetDirectories/GetFiles doesn't deal well with these names. I posted on MSDN forum.Barbara Posthttps://www.blogger.com/profile/17140293893479895573noreply@blogger.com