mv command on ftp server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting mv command on ftp server
# 1  
Old 08-09-2011
mv command on ftp server

Guys,
I have question regarding moving files from one folder to another on ftp server. It got nothing to do with the files or folders on my server

---------- Post updated at 10:28 AM ---------- Previous update was at 10:28 AM ----------

thanks in advance
# 2  
Old 08-10-2011
Generally, rename is move, just rename with absolute or high relative path, like "rename outbound/xxx20110810.gz ../archive/xxx20110810.gz", but of course with the right metacharacters for the target ftp server and system.
This User Gave Thanks to DGPickett For This Post:
# 3  
Old 08-12-2011
I got the rename command worked. But when i try to parameterize its not working
Code:
put ${FTP_FROM_FILENAME} ${FTP_TO_FILENAME}
rename /in/wcsFeed/tmpdrop${FTP_TO_FILENAME} /in/wcsFeed/dropoff/${FTP_TO_FILENAME}
quit


the put command is working to putting the files to /in/wcsFeed/tmpdrop but it is not able to rename to move it to /in/wcsFeed/dropoff.

If i manually do it like
rename /in/wcsFeed/tmpdrop/file.txt /in/wcsFeed/dropoff$/file.txt its working but i try to parameterize its not working. The parameter has multiple files

Last edited by Franklin52; 09-02-2011 at 03:25 AM.. Reason: Please use code tags for code and data samples, thank you
# 4  
Old 08-12-2011
Show your script.
# 5  
Old 09-01-2011
Use one ftp to list the targets, pipe to sed to make the names into rename commands, and pipe them to a second ftp session.
# 6  
Old 09-01-2011
Why not just put it where you want it?
Put $file /absolute/path/$file
ducet8
# 7  
Old 09-01-2011
Maybe they move the old out of the way first?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Ftp a directory to another server from the local server what is the command

ftp a directory to another server from the local server what is the command (2 Replies)
Discussion started by: PMoore
2 Replies

2. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

3. Linux

Generate public key to connect from one ftp server to other server

How to generate public key to connect from one ftp server to other server to use in scripting. (0 Replies)
Discussion started by: sridhardwh
0 Replies

4. UNIX for Advanced & Expert Users

Unable to use FTP command to connect from one server to another

Hi, I have two unix servers A and B. from A i am trying to use the ftp command to connect to B but I am getting the "ftp: connect: A remote host refused an attempted connect operation." I checked the following things : 1.) Unix Server details for A and B after running the command uname -a... (3 Replies)
Discussion started by: mick_000
3 Replies

5. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

6. UNIX for Dummies Questions & Answers

FTP that works correctly in command prompt and shows issue in UNIX server

Hi All, FTP ports opens with the given user name and password and allows to download file through COMMAND PROMPT. Code as below: H:\>ftp ftpxxxxx Connected to entvc2ft07-pub.xxxxx.com. 220 Microsoft FTP Service User (entvc2ft07-pub.xxxxx.com:(none)): userxxxxx 331 User name okay, need... (1 Reply)
Discussion started by: vijayalakshmi.r
1 Replies

7. Windows & DOS: Issues & Discussions

Office server => laptop =>client server ...a lengthy and laborious ftp procedure

Hi All, I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible. I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Discussion started by: kunwar
3 Replies

8. Red Hat

when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime

Guys, Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session. I am using RHEL 5.3. root@]# ll total 1740... (2 Replies)
Discussion started by: shtobias
2 Replies

9. Shell Programming and Scripting

preserving the timestamp of a file when copied from remote server to local server using ftp

Hi, I need to copy few files from remote server to local server. I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the remote directory to my local server with the timestamp of all those files shouldnt be changed. ... (5 Replies)
Discussion started by: arunkumarmc
5 Replies

10. Shell Programming and Scripting

ftp script not able to connect to ftp server.

I have the following ftp script to get files from a remote location. However, on running the script I find that I am not even able to connect to ftp server. I am able to connect to ftp server using other GUI ftp tools like WS_FTP using the same IP. IP used here is a dummy IP. What can go... (3 Replies)
Discussion started by: gram77
3 Replies
Login or Register to Ask a Question