Sponsored Content
Full Discussion: FTP Windows to Unix
Top Forums Shell Programming and Scripting FTP Windows to Unix Post 302346987 by methyl on Monday 24th of August 2009 02:58:29 PM
Old 08-24-2009
Here is an example MSDOS Batch file to adapt. Microsoft ftp syntax is pretty much the same as unix. We create a file containing the commands and then refer to that file in the ftp command line. The username and password go on the same line in that file.
Personally I would issue a local "cd" first rather than a ftp "lcd" because ftp is hopeless at dealing with names containing spaces.
If all your variables are static just put the ftp commands into a file rather than providing them as parameters.
BTW. I got the ftp syntax from the Microsoft website years ago.


Code:
REM ftptest3.bat
REM parameter driven with autologin

set X_FILE=%1
set X_USER=%2
set X_PASS=%3
set X_SERV=%4

echo user %X_USER% %X_PASS% > ftptest3.inp
echo ascii >> ftptest3.inp
echo get %X_FILE% >> ftptest3.inp
echo quit >> ftptest3.inp

ftp -n -s:ftptest3.inp %X_SERV%

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ftp from unix to windows

Hi, I have been using ftp to transfer files back and forth between windows and unix machines. But everytime i started the ftp session from the windows machine. I have a question why I am not able to connect to the same windows machine from the same unix machine. How do I do this? ... (11 Replies)
Discussion started by: oldtrash
11 Replies

2. UNIX for Dummies Questions & Answers

FTP from windows to unix

Hi all, How to FTP an excel format file located in windows to unix using shell script.Any particular commands we have to use? Thanks& Regards, rrs (4 Replies)
Discussion started by: rrs
4 Replies

3. UNIX for Dummies Questions & Answers

FTP from unix to Windows

Hi, I know that there should be a FTP server in Windows or a FTP listener daemon running in windows. Iam a beginner. May I know, what setup need to be done on Windows/unix end so that, a file can be transferred using sftp/scp from unix to windows. Thanks in Advance. (2 Replies)
Discussion started by: deepakwins
2 Replies

4. UNIX for Dummies Questions & Answers

Windows to UNIX FTP

Good Morning, I am currently having a setup of running a batch file in windows to ftp certain files to unix and after that one i login to a unix box to manually run a script to clean up those files and combine them into one and get go back to windows to run another batch of file to get the... (4 Replies)
Discussion started by: ryan_estiya
4 Replies

5. Shell Programming and Scripting

ftp from unix to windows

How to do ftp from unix to windows i have some files in a dir in unix box and i want to put those files in windows through FTP. How to do this ? (9 Replies)
Discussion started by: ali560045
9 Replies

6. Shell Programming and Scripting

ftp from windows to unix using a perl script on unix machine

i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
Discussion started by: raksha.s
3 Replies

7. Shell Programming and Scripting

FTP from Windows to UNIX

will this work, knowing that the file is in a directory in windows.. It is going from a drirectory in windoxs to UNIX \ # Error Handling Function function ErrorHandle { # if type is 1, then the file does not exist or unreadable if then echo "File... (5 Replies)
Discussion started by: rechever
5 Replies

8. AIX

Do I need to configure my local windows to FTP files from local windows to a UNIX AIX server?

Hi Friends, I have this script for ftping files from AIX server to local windows xp. #!/bin/sh HOST='localsystem.net' USER='myid_onlocal' PASSWD='mypwd_onlocal' FILE='file.txt' ##This is a file on server(AIX) ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD put $FILE... (1 Reply)
Discussion started by: rajsharma
1 Replies

9. Shell Programming and Scripting

UNIX script to FTP file from UNIX server to windows

Hi, I am new to this subject.....Can someone please help me out with the script... unix usernm "sdhftst" unix pwd "chsd13" windows usernm "dfghtst" windows pwd "chsd13" path..../xxx/xxxxx/xxxxxx/xxxxxxx please can u get me a script...its only one file to get ftp. Thanks... (2 Replies)
Discussion started by: himakiran9
2 Replies

10. Shell Programming and Scripting

FTP from windows to unix server using unix shell script

Hi, Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting? If so what command i need to use. thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies
giiQueryDeviceInfo(3)							GGI						     giiQueryDeviceInfo(3)

NAME
giiQueryDeviceInfo, giiQueryDeviceInfoByNumber - Get information about input sources SYNOPSIS
#include <ggi/gii.h>` int giiQueryDeviceInfo (gii_input_t inp, uint32_t origin, gii_cmddata_getdevinfo *info); int giiQueryDeviceInfoByNumber(gii_input_t inp, uint32_t number, uint32_t *origin, gii_cmddata_getdevinfo *info); DESCRIPTION
Though when using GII inputs the exact type of device is fully transparent to the program, information about the device that is actually attached to a given gii input and origin id can be queried, e.g. for configuration interfaces. For giiQueryDeviceInfo the parameters inp and origin select the input to query. This version is usually used, if you want to identify a device after getting an event from it. For giiQueryDeviceInfoByNumber the parameters inp and number select the input to query - origin gets set to the origin ID the queried device has. This version is used, when you want to query all known devices. The queried data is put into info. See gii_cmddata_getdevinfo(3) for the description of the structure. RETURN VALUE
Returns 0 on success (info is valid, then) or -1 otherwise. SEE ALSO
giiQueryValInfo(3) libgii-1.0.x 2006-12-30 giiQueryDeviceInfo(3)
All times are GMT -4. The time now is 11:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy