Link to home
Create AccountLog in
Avatar of compdigit44
compdigit44

asked on

How to trasfer a file from a windows xp computer to a AIX computer???

I'm the new admin at my company. We are a totaly winows enviroment except for one server that only 20 people connect to this server runs AIX and host a special application for out company. Every month certain files that to be loaded into the AIX server in a specific directory. Here is my question...From my windows xp workstation how can I transfer these files to this server or how do I pull these files from the AIX computer from my workstation please help!!!!!!!!!!!!!!!1
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

You may use ftp to either put files (windows to aix) or get files (on aix).

- if you want to run ftp on aix to get files, then

To automate ftp within a script, use .netrc file in the user's home directory (the one who will run the script). This file should not be readable by others i.e. use

chmod 400 .netrc

The entry in .netrc should be as below:

machine remoteserver
login remoteusername
password mypassword

Where

remoteserver is the server which is the ftp server (windows) where you want to get the file from
remoteusername is the remote user login name on the ftp server
mypassword is the password of the remote user on the ftp server

for more info about .netrc, please use man netrc

The script could be like:

cd /localdir
ftp remoteserver << END
cd /remotedir
prompt
get file
END

The get command can be mget if you want to get multiple files, or it could be put or mput if you want to send files.

Also, if you want to transfer binary files (not text) then add binary command before the put / get

This will require to have ftp server running on the windows system

- if you want to run ftp on widows to send files then

create a file e.g. call it aix.txt that contains

username
password
lcd c:\dir1
cd /dir2
prompt
binary
mput *.ext
quit

then run the command

ftp -s:aix.txt aixservername
Avatar of compdigit44
compdigit44

ASKER

Ok..I think I'm going to need to pull the files only three of them from my Xp workstation so if I'm undertanding you corrent I would need to you the get files command.... From the AIX prompt what is the exact synatax be for this command??
If you want to automate the pulling in a  script, then

1- create the .netrc file as described earlier
2- make sure that the windows hostname ( e.g. myxp ) and ip address are in /etc/hosts (if you are not using dns) and the hostname matches the one in .netrc
3- make a scrip call it e.g. getfiles that contains :

cd /dir1
ftp myxp << END
cd /dir2
binary (or ascii if text files)
prompt
get file1 ( or mget *.ext if more than one file with the same extension )
bye
END

4- make this file executable by

chmod 744 getfiles

5- to run

./getfiles

If you want to automate the job then you need to run the script as acrontab job ( I can show how if required)
But what if I want to do it manually
it is only one file
Ok, run the command

ftp myxp    (the windows system name or the IP address of it)
usename: (enter a valid username on the windows system - you need to have an ftp server to be running on windows system)
password: (enter password of the user)
pwd (to see the dir you are in)
ascii (if the file is text or use binary i it is binary / data file)
cd /remotedir (remote dir you may need to specify drivename:\dirname)
hash (to see file transfer progress)
get filename
bye


The above is an interactive session from the command line on aix

Isn't their anyway I can just do a regular file tranfers over the network??? like

copy \\mycp\<filename>  \\AIXServer\<path>
There are other ways to copy files but it depends on what you have available on aix and windows.

1- You can use scp which is secure copy and this requires

- ssh server s/w to be installed and running on aix (or windows if you want to do it the other way)

cygwin ssh server for windows:

http://www.mines.edu/~gmurray/HowTo/sshNotes.html

- ssh client s/w to be installed on the system from where you will initiate the transfer

You may download putty which is an ssh / scp (pscp) S/W for windows

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

2- You could use samba on aix where it allows you to either share a directory on aix to windows system where you can attach it as a network drive and then copy files using copy command on windows, or it let you access windows share from aix

http://us1.samba.org/samba
how do you coy these files from a floppy?
Do you mean a floppy on AIX? I do not really know?

But what is the problem in using ftp ?

I do have putty on my workstation???
Do you have ssh server installed and running on aix as well?

if yes then from windows command line you can run

\path\to\pscp file username@aixservername/remote/dir
the AIX server is set to accet telnet connection..not ssh
do you have a problem in using ftp?
no but I sound like I need to download a ftp server to my xp workstation first then login to the AIX server then pull the files.
Why don't you do it the other way?

Why don't you ftp from windows xp to aix?
I don't think ftp is enable ??? How can I double check
when you login to aix system run

ftp 0


If you get ftp prompt and you can authenticate successfully then it is running

Also fro the command prompt of win xp run

ftp ip_address_of_aix (or its hostname)

You should be able to see ftp prompt and authenticate
FTP is running on the AIX so know what is the command I need to type to transfer the files from my windows xp computer to the AIX server via FTP
ASKER CERTIFIED SOLUTION
Avatar of omarfarid
omarfarid
Flag of United Arab Emirates image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
were does windows look for the source file ??? Is it on the C:\ drive
in the example I gave, it was taken from c:\

If you have the file in some other dir / direve, then from command line run

d: (put your drive name here)
cd \path\tp\filesdir (put the actual dir path)

then run ftp command

You may also use GUI ftp clients like:

http://sourceforge.net/project/showfiles.php?group_id=21558