Hey all,
I'm trying to upload a file to my ftp server through an automated batch program. I will be uploading a file that's name changes according to you IP Address, so I am using the variable %ip% to represent the file's name. The problem occurs when it transfers over to the ftp portion of the batch program, as the file isn't found because the ftp portion can't use the batch portion's variables. I was wondering if it was possible to transfer the variables over to the ftp portion, and if so, how would it be done.
I'm not at all familiar with windows batch files, so this might not be possible. However, as nobody has posted anything, I thought it might be worth considering.
In the past I have generated a file with all of the necessary ftp commands and redirected that file into ftp from the command line. In psuedo code, it looks something like this:
I'm assuming that the batch processor under windows can expand a variable name on the echo, and thus the resulting file will contain the desired filename and not the unexpanded variable name.
Don't know if the windows based ftp supports a .netrc or like file in which passwords and usernames can be securely kept. If it does, I'd suggest looking into using that; it's not a good idea to have usernames/passwords floating round in your scripts.
Hi All,
i am doing ftp
how can i transfer multiple different files
example-
03-21-13 06:33AM 46800 CATT_HOURS.pgp
03-21-13 06:33AM 266392 CATT_TAX.txt
03-21-13 06:33AM 91448 CATT_STATUS.txt
03-21-13 06:33AM 468 ... (3 Replies)
Frdz, i have scenorio like i have to open ftp connection in a for loop and connect to the other server and upload the file again and again till the for loop ends but i am getting problem when i use the following code.
for i in `ls ${SOURCE_DIR}/`
do
FOLDER_NAME=`basename $i`
for j in `ls... (4 Replies)
I am going to transfer file from UNIX directory to remote windows location and i wrote the script but i am getting the error as 'FTP: not found' or i am getting this error 'The file path is not found'.
Please help me to resolve this problem as early as possible.(urgent).
my script is,
... (6 Replies)
Hi Guys,
I wanted to transfer files from FTP machine to Linux Machine.
In this, I need to create a batch file that will connect to the Linux Machine and Transfer the files specified as the parameter to the files.
Ex : transferfiles Product Time Geography
Here transferfiles shld contain... (4 Replies)
Hi All,
I am very new to shell scripting,I have some doubts how we can do a file transfer using ftp
I wanted to transfer files using non_secure ftp and secure ftp(sftp) mode,
for secure ftp i am using following code
verbose="verbose"
ftp="/usr/bin/ftp"
user="ABC"
pass="123"... (1 Reply)
I am using a Cobalt Raq4 with Apache web server. I am trying to set the intermediate SSL certificate. I have edited httpd.conf and have created the intermediate SSL certificate text file.
However when I try to upload the text file via ftp I get a "Permission denied" message. I am the server... (1 Reply)
Hi !
I created a similar script as shown below to automate an FTP transfer and encountered errors. Appreciate any advice to resolve this issue.
The script:
#!/usr/bin/ksh
ftp 'IP ADD' << cmd
user 'user' 'pass'
lcd /home/data
get 'FileA' FileB
quit
cmd
Connected to 'IP_ADD'.... (3 Replies)
Hi ....I'm trying to ftp 2 pkgs SUNWqlc & SUNWqlcx since they were accidentally deleted from my servers. For one reaseon or the other my server is not loading the cdrom, so I mounted the cdrom on a differernt server & ftp's to it.
I tried to get this pkg using the bin & I get an error message... (3 Replies)
Hi
I'm using Shell script which will ftp (download) a file from a host. I need to check whether the file has been transfered completley or not.
Can anyone tell me how to do that?
Thanks
Ben (1 Reply)