win32api.FindFiles Win2003, problem with Short Name

2005-10-13 Thread Frank Borell
I'm having a problem retrieving the ShortName from a file that was
written by a MAC and only from a Windows 2003 server.

I realize the file has a space after it, but I can retrieve the short
name from Windows XP and 2000;

>>>print win32api.FindFiles(process_source_dir + "*")

Excluding the results from "." and "..", it returns:
(32, , ,
, 0, 44118, 2974, 0, '10^2f16
Hardcover a ', '10^2F167.5AC') - All OK!!

When using the same command on Win2003, it returns:
, , 0,
44118, 2974, 0, '10^2f16 Hardcover a ', '')

The versions of Python / Win32 are the same on all servers.
Does anyone have any ideas?

Frank

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32api.FindFiles Win2003, problem with Short Name

2005-10-14 Thread Frank Borell
Neil,

On all three types of PC/Servers they are set to 0.

For now I'll have to process this script on non 2003 servers?!?

Thanks,

Frank

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: win32api.FindFiles Win2003, problem with Short Name

2005-10-17 Thread Frank Borell

Neil Hodgson wrote:
> Frank Borell:
> > On all three types of PC/Servers they are set to 0.
> >
> > For now I'll have to process this script on non 2003 servers?!?
>
> What do you get if you call win32api.GetShortPathName on the long name?
>
> Neil

Neil,

It seems I'm in a catch 22.

My initial issue was trying to rename/move files on a SAN that were
written from Mac's. While the easier messed up files names were easy to
convert and move, I quickly came across a few types that were not.
Files with spaces at the end seemed to only be solved with the
win32api.FindFiles(fullpath + '*').

The catch 22:
All other commands reported the path structure but the output could not
be used because Python/the system reported that it could not find the
file/path specified. (Including GetShortName).

Unfortunately I've been testing on an XP with all working fine, the
Win2003 simply does not show anything on the SAN for FindFiles(last
tuple).

It DOES show shortnames for other directories like 'c:/python24/lib'

Win2003 on ''c:/python24/lib'

Original Name | Short Name

aifc.py|
anydbm.py|
asynchat.py|
asyncore.py|
atexit.py|
atexit.pyc|
audiodev.py|
base64.py|
base64.pyc|
BaseHTTPServer.py|BASEHT~1.PY
Bastion.py|


WinXP on SAN:

Original Name | Short Name

^2aCOSBY SON PROFILE^2fNYT18|A^2ACOSB.1A7
Jimmy Carter|JIMMY_CF.86A
Allende's Last Day-jpgd.|ALLENDEC.9D3
archives 1959|ARCHIVE6.330
Barbara Jordan|BARBARAF.714
Bettmann-Mine 24.6mgs|BETTMAN7.D79
Bosley Crowther 16-095.jpg|BOSLEY_F.148
Calvin Klein.jpg|CALVIN_5.0B1
Carl Erskine Bkyln Dodger.jpg|CARL_ER8.683

Win2003 on SAN:

Original Name | Short Name

A^2aCOSBY SON PROFILE^2fNYT18|
Jimmy Carter|
Allende's Last Day-jpgd.|
archives 1959|
Barbara Jordan|
Bettmann-Mine 24.6mgs|
Bosley Crowther 16-095.jpg|
Calvin Klein.jpg|
Carl Erskine Bkyln Dodger.jpg|
Chess^2fConrad|
Coco Chanel portrait 18-940.jpg|
Coco Chanel1 18-940.jpg|


Frank

-- 
http://mail.python.org/mailman/listinfo/python-list