Re: spaces at ends of filenames or directory names on Win32

2006-03-02 Thread Christos Georgiou
On Thu, 23 Feb 2006 17:49:31 -0600, rumours say that Larry Bates <[EMAIL PROTECTED]> might have written: >IMHO leading and/or trailing spaces in filenames is asking for >incompatibilities with cross-platform file access. Much like >using single-quote in filenames which are perfectly legal in >DOS

Re: spaces at ends of filenames or directory names on Win32

2006-02-28 Thread rtilley
[EMAIL PROTECTED] wrote: > It works for me. Right. I've found that it's not just the end spaces. The Macs somehow copy these files and folders to the PCs without a security descriptor of any type! When I goto the folder's properties, I see three tabs: 1. General 2. Web Sharing 3. Customize The

Re: spaces at ends of filenames or directory names on Win32

2006-02-27 Thread [EMAIL PROTECTED]
rtilley wrote: > Roel Schroeven wrote: > > rtilley schreef: > > > >> This will at least allow me to ID folders that start with > >> whitespace... from within Windows too :) yet I still cannot rename the > >> folders after stripping the whitespace... attempting to gives an > >> [Errno 2] No such fi

Re: spaces at ends of filenames or directory names on Win32

2006-02-27 Thread rtilley
Roel Schroeven wrote: > rtilley schreef: > >> This will at least allow me to ID folders that start with >> whitespace... from within Windows too :) yet I still cannot rename the >> folders after stripping the whitespace... attempting to gives an >> [Errno 2] No such file or directory. The strip

Re: spaces at ends of filenames or directory names on Win32

2006-02-27 Thread Roel Schroeven
rtilley schreef: > This will at least allow me to ID folders that start with whitespace... > from within Windows too :) yet I still cannot rename the folders after > stripping the whitespace... attempting to gives an [Errno 2] No such > file or directory. The strip seems to work right too accord

Re: spaces at ends of filenames or directory names on Win32

2006-02-27 Thread rtilley
This will at least allow me to ID folders that start with whitespace... from within Windows too :) yet I still cannot rename the folders after stripping the whitespace... attempting to gives an [Errno 2] No such file or directory. The strip seems to work right too according to the prints before

Re: spaces at ends of filenames or directory names on Win32

2006-02-27 Thread rtilley
[EMAIL PROTECTED] wrote: > Please post your Python code. I don't see the problem you're > describing. OK, here's a copy. This works on Mac/Unix/Linux yet has no effect on Windows: - import os import os.path for root, dirs, files

Re: spaces at ends of filenames or directory names on Win32

2006-02-27 Thread rtilley
[EMAIL PROTECTED] wrote: > Please post your Python code. I don't see the problem you're > describing. OK, here's a copy. This works on Mac/Unix/Linux yet has no effect on Windows: - import os import os.path for root, dirs, files

Re: spaces at ends of filenames or directory names on Win32

2006-02-26 Thread Tim Roberts
[EMAIL PROTECTED] wrote: >For example... tell windows to move a file named ' XXX ' (one space >before and one space after the filename). Windows will complain that >file 'XXX' does not exist. It's correct of course, 'XXX' does not >exist, >but ' XXX ' does indeed exist. > >Can anyone rescue me fro

Re: spaces at ends of filenames or directory names on Win32

2006-02-25 Thread Jeffrey Schwab
Larry Bates wrote: > Jeffrey Schwab wrote: > >>Larry Bates wrote: >> >> >>>IMHO leading and/or trailing spaces in filenames is asking for >>>incompatibilities with cross-platform file access. >> >>With what platforms specifically? >> >> >>>Much like >>>using single-quote in filenames which are per

Re: spaces at ends of filenames or directory names on Win32

2006-02-25 Thread Larry Bates
Steven D'Aprano wrote: > On Thu, 23 Feb 2006 17:49:31 -0600, Larry Bates wrote: > >> Steven D'Aprano wrote: >>> On Thu, 23 Feb 2006 14:30:22 -0600, Larry Bates wrote: >>> How about not naming files with leading and trailing spaces on the Mac? Seems like a bad habit that needs breaking ;

Re: spaces at ends of filenames or directory names on Win32

2006-02-25 Thread Larry Bates
Jeffrey Schwab wrote: > Larry Bates wrote: > >> IMHO leading and/or trailing spaces in filenames is asking for >> incompatibilities with cross-platform file access. > > With what platforms specifically? > >> Much like >> using single-quote in filenames which are perfectly legal in >> DOS/Windows

Re: spaces at ends of filenames or directory names on Win32

2006-02-25 Thread drobinow
For example... tell windows to move a file named ' XXX ' (one space before and one space after the filename). Windows will complain that file 'XXX' does not exist. It's correct of course, 'XXX' does not exist, but ' XXX ' does indeed exist. Can anyone rescue me from this madness :( - Please p

Re: spaces at ends of filenames or directory names on Win32

2006-02-24 Thread Tim Roberts
rtilley <[EMAIL PROTECTED]> wrote: > >For example... tell windows to move a file named ' XXX ' (one space >before and one space after the filename). Windows will complain that >file 'XXX' does not exist. It's correct of course, 'XXX' does not exist, >but ' XXX ' does indeed exist. Are you sure

Re: spaces at ends of filenames or directory names on Win32

2006-02-24 Thread Steven D'Aprano
On Thu, 23 Feb 2006 17:49:31 -0600, Larry Bates wrote: > Steven D'Aprano wrote: >> On Thu, 23 Feb 2006 14:30:22 -0600, Larry Bates wrote: >> >>> How about not naming files with leading and trailing spaces on >>> the Mac? Seems like a bad habit that needs breaking ;-). >> >> Why is it a bad habi

Re: spaces at ends of filenames or directory names on Win32

2006-02-23 Thread Jeffrey Schwab
Larry Bates wrote: > IMHO leading and/or trailing spaces in filenames is asking for > incompatibilities with cross-platform file access. With what platforms specifically? > Much like > using single-quote in filenames which are perfectly legal in > DOS/Windows, but Linux doesn't like much. Uh...

Re: spaces at ends of filenames or directory names on Win32

2006-02-23 Thread Larry Bates
Steven D'Aprano wrote: > On Thu, 23 Feb 2006 14:30:22 -0600, Larry Bates wrote: > >> How about not naming files with leading and trailing spaces on >> the Mac? Seems like a bad habit that needs breaking ;-). > > Why is it a bad habit? Because *Windows* is primitive enough that it can't > cope w

Re: spaces at ends of filenames or directory names on Win32

2006-02-23 Thread Steven D'Aprano
On Thu, 23 Feb 2006 14:30:22 -0600, Larry Bates wrote: > How about not naming files with leading and trailing spaces on > the Mac? Seems like a bad habit that needs breaking ;-). Why is it a bad habit? Because *Windows* is primitive enough that it can't cope with leading and trailing spaces? I d

Re: spaces at ends of filenames or directory names on Win32

2006-02-23 Thread [EMAIL PROTECTED]
rtilley wrote: > # Spaces are present before and after the XXX > filename = ' XXX ' > > new_filename = filename.strip() > > if new_filename != filename: > print filename > > Macs allow these spaces in file and folder names. Which is OK. The > problem arises when the file or folder is copied to

Re: spaces at ends of filenames or directory names on Win32

2006-02-23 Thread Larry Bates
rtilley wrote: > Larry Bates wrote: >> How about not naming files with leading and trailing spaces on >> the Mac? Seems like a bad habit that needs breaking ;-). >> >> -Larry Bates > > Users will be users! Tell that to the guys and gals on Macs who like to > make a folder sort based on the number

Re: spaces at ends of filenames or directory names on Win32

2006-02-23 Thread rtilley
Larry Bates wrote: > How about not naming files with leading and trailing spaces on > the Mac? Seems like a bad habit that needs breaking ;-). > > -Larry Bates Users will be users! Tell that to the guys and gals on Macs who like to make a folder sort based on the number of spaces they've placed

Re: spaces at ends of filenames or directory names on Win32

2006-02-23 Thread Larry Bates
rtilley wrote: > # Spaces are present before and after the XXX > filename = ' XXX ' > > new_filename = filename.strip() > > if new_filename != filename: > print filename > > Macs allow these spaces in file and folder names. Which is OK. The > problem arises when the file or folder is copied