why the mv is not working in an FTP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting why the mv is not working in an FTP
# 1  
Old 07-23-2009
why the mv is not working in an FTP

Why when I mv $UpLoadFileName supfinaid.DSB
does not work,
it is getting the $UpLoadFileName and it is moving it to the right location,
but not the move,
Let me know if you want to see the all script, I just want to rename
$UpLoadFileName, it is moving $UpLoadFileName to the right directory but not the rename part..
Thank you

Code:
# Change the directory to one contains the file to be transported
$CDRemoteDir;
# Change dir to where the ftp will place the uploaded file
cd ${LocalDir}
# Initiate the FTP process
ftp -n $RemoteHost <<!EOF
quote user $RemoteUser
quote pass $RemotePass
get $UpLoadFileName
mv $UpLoadFileName supfinaid.DSB
###get $NewName
quit
!EOF
# End of FTP Process
#========================================================================#


Last edited by DukeNuke2; 07-24-2009 at 10:44 AM..
# 2  
Old 07-23-2009
try..

Code:
mv $UpLoadFileName $REMOTE_HOMEFULLPATH/supfinaid.DSB

# 3  
Old 07-24-2009
You may want to use "rename" instead of "mv" some ftp software doesn't support "mv".
# 4  
Old 07-24-2009
I did it
[code]
get 07240900.SUP
mv 07240900.SUP /u02/sct/banner/bandev2/finaid/dat_files/eluppdtop.dat
[code /]
It does not work, the get works the 07240900.SUP is in /u02/sct/banner/bandev2/finaid/dat_files
but the mv does not work!!
# 5  
Old 07-24-2009
FTP does not support full pathnames in target filenames.
As the old and new files will be in the same directory ...

Code:
rename 07240900.SUP eluppdtop.dat

# 6  
Old 07-24-2009
Quote:
FTP does not support full pathnames in target filenames.

I did not get it.

Code:
rename /my/path1/myfile1 /my/path2/file1

should work. (full path name in target filename)
# 7  
Old 07-25-2009
FTP has much variation beyond the FTP "core" specification.

What is the Operating System and version of the source computer and the target computer?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Working with FTP

Hi all, i am using fedora 11,and want to make my system as ftp server. I have installed vsftp package and vsftpd daemon is also running. Can i access my files from outer world i.e. internet using ftp? How can i do that? i started vsftpd daemon and tried to access server from other system like... (2 Replies)
Discussion started by: yashwantkumar
2 Replies

2. Solaris

Why is sftp working but ftp not

I am not very familiar with the use of FTP, and trying to run it I found out that standard "ftp" is not working" but "sftp" is. If sftp is allowed will that block ftp ? and if so where is this set ? I thought there is no relationship, is that right ? If so look here: inetadm | grep ftp enabled... (11 Replies)
Discussion started by: manni2
11 Replies

3. Solaris

FTP not working Solaris 10

Hi All, I have a problem with FTP service on Solaris 10. Whenever I try to FTP to one machine locally (ftp localhost) or from other machine I don't get any response, I see the ftp service on the machine is online and listening to port 21 but ftp is not responding. Also it seems i can't... (16 Replies)
Discussion started by: belal84
16 Replies

4. Shell Programming and Scripting

Script not working after FTP

Hi Gurus, I prepared a script to process some files and then ftp the output file to mainframe directory. Here is the code snippet for the same. # Perform FTP echo "put $TGT_DR/$K.$F.$I.$K1.$RUN_TYPE '$K.$F.$I.$K1.$RUN_TYPE'" >> $LogFile ftp -i -n <<EOF >> $LogFile open... (2 Replies)
Discussion started by: svajhala
2 Replies

5. Solaris

All i/o (ftp) not working on this SunOS 5.10

Hi everyone: I have been trying to simply FTP a file over to this SunOS 5.10 (which is same as Solaris 10 now) and nothing works! I can only Telnet to this via SSH (with my own account/uid), and I can also send simple mail out with mailx, that's all!!! I cannot FTP to it (I think FTP... (7 Replies)
Discussion started by: steve701
7 Replies

6. Linux

FTP not working under Linux but working under any other OS ??? Very strange

Dear all, I am totally despaired and puzzled. Using Filezilla under Windows under the same network as our Linux servers is working. Using FTP command-line client under any of our Linux debian servers is not working ! I tried with different FTP servers -> same problem ! All commands are... (12 Replies)
Discussion started by: magix_ch
12 Replies

7. UNIX for Dummies Questions & Answers

FTP not working, need some help

I am trying to set up an account for a user on our network to ftp into and access his folder for his web site. I have been tossed into the previous web hosting server without really knowing much about how it has or is set up, but I've been following most of the tutorials I have seen around the... (0 Replies)
Discussion started by: nlraley
0 Replies

8. Web Development

is wget working in ftp ?

I get ftp> wget ?Invalid command. ftp> 0 * * * * wget -O - -q -t 1 http://www.example.com/cron.php ?Invalid command. thanks (6 Replies)
Discussion started by: aneuryzma
6 Replies

9. AIX

FTP is not working

Upto last month my script was working fine, Now I am getting following error, any one help me? Tcl_Init failed: Can't find a usable init.tcl in the following directories: /usr/local/lib/tcl8.0 ./lib/tcl8.0 ./tcl8.0/library ./library This probably means that Tcl wasn't installed... (0 Replies)
Discussion started by: redlotus72
0 Replies

10. Cybersecurity

FTP is not working.

Hi, I'm getting the following error while trying to use the ftp command. ---------------- 331 Password required for prodofsa. Password: 230 User prodofsa logged in. ftp> ftp> ftp> ftp> ls 200 PORT command successful. 425 Can't build data connection: Connection timed out. ftp>... (10 Replies)
Discussion started by: ronald_brayan
10 Replies
Login or Register to Ask a Question

Featured Tech Videos