How to move a file in ftp command to other location?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to move a file in ftp command to other location?
# 1  
Old 05-07-2013
How to move a file in ftp command to other location?

hi,

when i do ftp from unix to laptop which is running a windows os, it lands in a root folder.
can i move a file from this root ftp folder to any other location in my laptop
say , c:\files\ folder?

i used rename command inside ftp , but it says incorrect parameter.
# 2  
Old 05-07-2013
Yes. Use the CD command.

If you are using GET (i.e because you're connecting from Windows to Unix), then use the LCD command to change the local working directory.
# 3  
Old 05-07-2013
i am connecting as an anonymous user from unix to windows.

the below command works properly
this below command was typed soon after log in. so it displays the root directory.

Code:
ftp> pwd
257 "/" is current directory.

but when i try to change the directory using

Code:
ftp> cd C:\
550 The parameter is incorrect.

the above error comes.
# 4  
Old 05-07-2013
Try using cd C:/, or just cd /.

(i.e. with forward slashes, not backslashes)
# 5  
Old 05-07-2013
its not working

Code:
ftp> cd C:/
550 The parameter is incorrect.

if i use

Code:
ftp> cd /

its successful but its in the same directory(root directory of ftp) from where i am running the command.. i need to change the directory to some other location..
# 6  
Old 05-07-2013
Then chose the location.

Code:
cd /some/directory

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Get all the files from a FTP location with previous week's dates in the file names using Linux

I have a weird requirement where I have to get the files from a FTP(Lets say FTP1) location and place it on my current FTP(Lets say FTP2) location. The issue is, these are daily files (in a pattern Sales_YYYYMMDD_report.csv) and are placed every day on FTP1 and my process usually runs on Monday(eg.... (2 Replies)
Discussion started by: dhruuv369
2 Replies

2. UNIX for Advanced & Expert Users

Want to download a latest file with current date from FTP location

Dear Friends, I need help to write a shell / perl script to download the files from FTP location, having different file names (date inside the file name). Example: Mar 5 09:24 cfx_03052013_return_file.txt Mar 6 02:13 cfx_03062013_return_file.txt Mar 7 06:40... (3 Replies)
Discussion started by: Praveen Pandit
3 Replies

3. Shell Programming and Scripting

How to find a word and move it a specific location in xml file using perl?

Hi friends, I have one XML file having below structure :- INput XML file :- <?xml version="1.0" encoding="UTF-8"?> <START> <A=value1> <attr name1="a1"> </A> <B=value2> <attr name2="b1"> <attr name3="c1"> </B> </START> output xml file should be === (3 Replies)
Discussion started by: harpal singh
3 Replies

4. Shell Programming and Scripting

How to move the older than 30 file to another ftp server

Hi All I need to move the older than 30 days file to another ftp server. I have source structure like this Files folder Folder1 Folder2 Folder3 I need to create same Target structure and I need to move the older than 30 day file to another ftp server, can you please suggest me how I develop... (1 Reply)
Discussion started by: murari83.ds
1 Replies

5. Shell Programming and Scripting

move files to a different location

Hi Guys, I need to write a script that will loop on all of my oracle databases on a server and move archivelogs from archive destination to a different location. I do have a function to loop on all databases on a server. I want help in writing a fuction to dynamically get the archive... (1 Reply)
Discussion started by: Phuti
1 Replies

6. Shell Programming and Scripting

After FTP unable to move file to other location

Hi Experts, I am using below script and facing some problems.. cd /home/user/test rm ftp://ftp.log Example: A_Bachfile_09292011.txt A=`ls -1 "A*.txt"` compress $A C=`ls -1 "A*` hostname="test.gmail.com" user="raju" Password="******" ftp -n $hostname <<EOF >>ftp.lpg... (4 Replies)
Discussion started by: rajubollas
4 Replies

7. Shell Programming and Scripting

Move files from one location to another

Hi, I wanted to check how to move files from one location to another based some particular date. Example I want to move /data/NewJersey folder to /home/scripts/NJ ( including all the files and subfolders within it ), but only which are older than say 8th February 2010. script , awk, sed (... (4 Replies)
Discussion started by: rudoraj
4 Replies

8. Shell Programming and Scripting

ftp: get list of file to get. Retrieve and move them

Hi, I need to get multiple files from an ftp server. Once the files have been downloaded, I need to move them to a different directory on the ftp server. I don't know of a command that would enable me to get a file and then move it (assuming I don't know the exact file name) within ftp. I think... (10 Replies)
Discussion started by: bbabr
10 Replies

9. Shell Programming and Scripting

how to put file from one ftp to another ftp location

hi, I have one file located in ftp.I want to place that file in different ftp location. Up to now i am doing it manually using get command and copying that file in to my local system and then putting that file in different ftp using put command. now i want to automate that using shell... (1 Reply)
Discussion started by: prasee
1 Replies

10. UNIX for Advanced & Expert Users

How to move an application from one location to another

Hi all, I have installed an application (RRDTool) in /usr/local directory, Can any one tell me how I can move this to some other location along with the libraries. Thanks in Advance. (3 Replies)
Discussion started by: KK Varma
3 Replies
Login or Register to Ask a Question