Re: Transferring directory structure to Windows



Roger,

As you had to do it the author of the original post
might just as well have to do it, probably already
done with it.

Filename collisions are a real threat but it should be
easily solved with a simple shell script with a
combination of "grep" (using the -c and -i flags) and
a variable set to either lower or upper case (typset
-l varname), or maybe even sort might be able to
handle the lower/upper case issue (print the unique
filenames and if the count does not match the file
count u got a problem.

I've used ncftp, scp and other tools to transfer
countless files from my pc to unix and back, moved
Lotus Notes servers from Windows to AIX and vice
versa, so far, no problems, the only warning is that
scp does binary transfers, so it is not very helpful
with text files.

regards,
enrique.

--- Roger Deschner <rogerd@xxxxxxx> wrote:

CAN'T BE DONE. GIVE UP NOW. I'm serious.

The problem is that AIX is Unix, and file names are
case significant,
while in Windows file names are nOt CaSe
significant. The problem is
that on Unix, filename, FileName, fILEnAME, and
FILENAME are four
different files, but when you move them to Windows
by ANY method,
whether FTP, tar, or whatever, you will only wind up
with one of them,
and it is impossible to predict which. Windows can
fool you into
thinking it will do this, because it does preserve
the case of file
names, but still on Windows, filename, FileName,
fILEnAME, and FILENAME
are all just different ways of typing the name for
the same one file.

I once got involved in a project where I had to do
exactly that, and I
had no choice but to do it, and do it accurately,
because it was a
result of a court order concerning a web site that
had been hosted on
Unix. In order to comply with the court order to
provide ALL of the
data, I had to write elaborate programs to search
for name collisions,
which did actually exist, not only in file names,
but also in directory
names. So I had to carefully search for all
collisions, and not only
document them, but also unfold them into made-up
directory and file
names, and then carefully document the made-up
names.

The tar program was another problem. It does not
accept path or file
names as long as AIX, and the data set I was working
with had both
directory and file names that exceeded tar's
limitations. This initially
led to a misunderstanding, hiding the extent of the
name-case problem.

I still used tar, but once again, I made up fake
names and had to
carefully document how I made up names and how they
corresponded to real
names.

There is a small set of file names that are reserved
in all versions of
Windows, even modern ones, that turned out to be
surprises. Wouldn't you
know it, my data set had some of these on Unix. The
reserved names are
(any case) aux, clock$, com1, com2, com3, com4, con,
lpt1, lpt2, lpt3,
prn, lst, nul, followed by a dot and three or fewer
characters. This is
ancient legacy from MS/DOS. Yup, aux.htm is an
illegal filename in
Windows. You can make them legal by extending the
portion after the dot
to four or more characters, such as renaming aux.htm
to aux.html. Also
beware that Windows file names cannot contain the
colon (:) character.

There were further limitaitons imposed by the
requirement to provide the
data on CDs, which meant that I had to meet the even
more severe
limitaitons of the Joliet _AND_ Rockridge CD
filesystems.

The whole thing was a LOT of work, a major project
that was all I did
for several weeks. And the final result was not what
anybody wanted,
which was an exact transcription of the files as
they existed on Unix,
into the Windows file system. That, quite simply, is
impossible to do.

There is no easy solution. You are trying to do
something which is very,
very difficult to do right. I would advise
reconsidering whether you
want to do this at all in the first place.

Roger Deschner University of Illinois at
Chicago rogerd@xxxxxxx
Academic Computing & Communications
Center
============ "The World's Least Intuitive Operating
System" ============
=============== -- from the cover of "Unix for
Dummies" ================


On Mon, 6 Nov 2006, Jean-Marc Monnez wrote:

How about (free on AIX) curl, ncftpput, or expect ?
I never tried, but
AFAIK they could help.
(NB : I have my own development to "put" directory
tree with ftp, but it
is context specific.)
Regards.
-- JMM

-----------------------------
Jean-Marc MONNEZ
MSA / AGORA / ATD
monnez.jean-marc@xxxxxxxxxxxx
-----------------------------

Green, Simon (EDS) a écrit :
I'm not able to install any software on the
Windows server, so I don't think
that'll help me.

I *think* that tar'ing them up and ftping that,
then extracting with WinZip
will work, but it's a bit clumsy and mean I need
twice as much disk space.

Simon

-----Original Message-----
From: IBM AIX Discussion List
[mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Baghele, Bipin
Sent: 03 November 2006 16:16
To: aix-l@xxxxxxxxxxxxx
Subject: Re: Transferring directory structure to
Windows


Try winscp (http://winscp.net/eng/index.php)

-----Original Message-----
From: IBM AIX Discussion List
[mailto:aix-l@xxxxxxxxxxxxx] On Behalf Of
Green, Simon (EDS)
Sent: Friday, November 03, 2006 10:47 AM
To: aix-l@xxxxxxxxxxxxx
Subject: Transferring directory structure to
Windows

We're migrating a lot of files from an AIX 4.3.3
server to a Windows
server.
On the AIX box, each file will be in its own
directory, all of which are
subdirectories of one main directory.

Now, an ftp "mget *" would get all of the files,
but it won't preserve
the
directory structure. Since some of the files may
have duplicate names
this
won't do. Is there any way I can copy an entire
directory structure
with
readily available tools? (I don't have time to
obtain anything new.)
best
thing I can come up with so far is to tar them up
and ftp that to the
Windows box, then use WinZip to extract the data,
although I'm not sure
what
that'll do to the directory structure. Or I
could install a zip utility
from the AIX Toolbox: not sure if there's any
advantage to that.

There's quite a lot of data involved, and many
thousands of files.

Any suggestions appreciated.


Ce message est protégé par les règles relatives au
secret des correspondances. Il est donc établi à
destination exclusive de son destinataire. Celui-ci
peut donc contenir des informations confidentielles.
La divulgation de ces informations est à ce titre
rigoureusement interdite. Si vous avez reçu ce
message par erreur, merci de le renvoyer à
l'expéditeur dont l'adresse e-mail figure ci-dessus
et de détruire le message ainsi que toute pièce
jointe.

This message is protected by the secrecy of
correspondence rules. Therefore, this message is
intended solely for the attention of the addressee.
This message may contain privileged or confidential
information, as such the disclosure of these
informations is strictly forbidden. If, by mistake,
you have received this message, please return this
message to the addressser whose e-mail address is
written above and destroy this message and all files
attached.




Enrique Sanchez Vela
email: esanchezvela@xxxxxxxxx
--------------------------------------
http://www.savetheinternet.com/



____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index



Relevant Pages

  • Re: Migrating Matlab files from Windows to UNIX
    ... distinguish \ between part of a filename r a dir sep. ... But Matlab could have prevented this. ... One company wanted a Windows version, ... others wanted on UNIX. ...
    (comp.soft-sys.matlab)
  • Re: Migrating Matlab files from Windows to UNIX
    ... distinguish \ between part of a filename r a dir sep. ... One company wanted a Windows version, ... others wanted on UNIX. ... expect software to conform to the standards for that platform. ...
    (comp.soft-sys.matlab)
  • Re: Migrating Matlab files from Windows to UNIX
    ... Michael Wild wrote: ... distinguish \ between part of a filename r a dir sep. ... One company wanted a Windows version, ... others wanted on UNIX. ...
    (comp.soft-sys.matlab)
  • Re: Transferring directory structure to Windows
    ... Transferring directory structure to Windows ... Filename collisions are a real threat but it should be ... whether FTP, tar, or whatever, you will only wind up ...
    (AIX-L)
  • Re: Windows Media Player executes WMF content in .MP3 files.
    ... The Unix kernel (and I apologise for using the word ... > does the same thing that people are upset about Windows Media Player doing. ... If the platform traditionally uses extensions to determine ... fooled into thinking that the filename is important, ...
    (comp.security.misc)