FTP the whole file structure


 
Thread Tools Search this Thread
Operating Systems HP-UX FTP the whole file structure
# 1  
Old 07-31-2014
FTP the whole file structure

Hi
I need to ftp the whole file structure from various unix servers to a windows server
I have a sub script for each machine and am using
ftp -is:../%name%_prog.bat -i %server% on the windows side.

The problem then comes with the mget command
it gets all the files , but puts them in one directory, and so I loose the structure.

Is these a way I can ftp all the files and keep the sub directories etc

Thanks
MadMacher
# 2  
Old 07-31-2014
Get Norton Commander or Midnight Commander,
it handles FTP file system like native file systems - a recursive copy between them is one mouse click.
Did you try it with the Windows Explorer by using a ftp://server/folder location?
# 3  
Old 07-31-2014
Hi
thanks for the reply
unfortunately I need to do this as a scheduled task or cron job and so need to have it in a script
tried mget -R, wget -m and even ncftpput but all just giving me files and no directories

madmacher

Last edited by rbatte1; 07-31-2014 at 10:45 AM.. Reason: Added ICODE tags round in-line code
# 4  
Old 07-31-2014
You might need to either write something to determine the files and then loop round, or perhaps you could use tar to create a single file, send that and arrange to extract it on the other side.

Could you consider rsync, rcp or scp perhaps? Would one of those meet your needs? It depends what you are running on both sides.

Another way would be to NFS share, but i'm always a little wary of tying machines together in this way.




Robin
# 5  
Old 07-31-2014
What OS on the Unix side? You could just use Samba to share the files out and mount them on the Windows server.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Maintaining file structure

Hi guys, I am trying to store some output in a file and then compare it to another file. I am gathering information from 2 commands: cat /opt/jbin/server.log.tmp > A grep "ephemeral" /opt/jbin/log/server.log.2015-05-02-18 > B The contents of both file are the same. This means if I do a... (3 Replies)
Discussion started by: Junaid Subhani
3 Replies

2. Red Hat

Copy certain file types recursively while maintaining file structure on destination?

Hi guys, I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash. I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also... (1 Reply)
Discussion started by: rockf1bull
1 Replies

3. Shell Programming and Scripting

case structure in .sh file

Hi, while true do printf "$FBOLD\nPlease enter the minutes (0-59): $FREG" read MIN case "$MIN" in ||s) break 2;; *) echo "" echo "Invalid minutes, please try again.";; esac done In the above... (4 Replies)
Discussion started by: milink
4 Replies

4. Shell Programming and Scripting

drop down structure in file

I have file like this 120, rahim, d40 115, rahul, d40 113, begum, d40 I want to group this file like this 120, rahim, d40 115, rahul, 113, begum, can any one help me on this thanks in advance (1 Reply)
Discussion started by: trichyselva
1 Replies

5. Programming

compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies

6. Shell Programming and Scripting

File structure comparison

To test server migration, we need to compare files under a directory in source and target servers. I need to verify if the below two directories on two servers are identical (i.e., contains same directories and files with same size. They may have multiple level sub-directories) ... (3 Replies)
Discussion started by: krishmaths
3 Replies

7. Programming

Search attributes in one structure using the values from another structure

Hello Groups I am trying to find out ways of comparing a value from a 'c' structure to a value in another 'C' structure. the 'C' structure can be a List or liked list as it contains lot many records. if we loop it in both the structures it is going to consume time. I am looking for a simple... (3 Replies)
Discussion started by: dhanamurthy
3 Replies

8. UNIX for Dummies Questions & Answers

Why cant i find my ftp directories in the unix structure

Hi, I'm new here so hello to everyone...i'm also new to linux/unix but got my first dedicated server about 2 weeks ago and have been using ssh to configure it on ubuntu linux. I have a question about something i can't work out....if i use ftp to transfer files ( php, html, javascript files... (2 Replies)
Discussion started by: elduderino
2 Replies

9. Shell Programming and Scripting

file structure

Hi, Is there a command that can help me to determain a unix file structure ? Thanks (7 Replies)
Discussion started by: yoavbe
7 Replies

10. UNIX for Dummies Questions & Answers

Copying a Directory Structure to a new structure

Hi all Is it possible to copy a structure of a directory only. e.g. I have a file with the following entries that is a result of a find :- /dir1/dir2/file.dbf /dir1/dir2/dir3/file1.dbf /dir1/file.dbf I want to copy these to a directory and keep the structure however starting at a new dir... (8 Replies)
Discussion started by: jhansrod
8 Replies
Login or Register to Ask a Question