spaces at ends of filenames or directory names on Win32

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Mon Feb 27 16:56:16 EST 2006


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 according to the 
> prints before and after.

Does the rename work if try with other names? Maybe the problem is not 
the whitespace; maybe Windows can't rename the folder because some 
process, possibly your program, has an open handle to a file or 
directory under your folder? Unix-systems are able to handle that 
easily, but Windows doesn't.

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven



More information about the Python-list mailing list