![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copying & moving en masse | anekab | UNIX for Dummies Questions & Answers | 4 | 06-02-2008 09:50 AM |
| Moving Files | iAm4Free | Shell Programming and Scripting | 5 | 03-28-2007 01:13 AM |
| copying/moving partition | antalexi | SUN Solaris | 4 | 11-11-2006 03:59 PM |
| moving between vi files | aya_r | Shell Programming and Scripting | 2 | 08-23-2005 01:36 AM |
| moving files ?? | rocker40 | UNIX for Dummies Questions & Answers | 9 | 11-09-2003 05:36 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi
I want to FTP some file from one server to another server, those file should copy from one server to another and then move the same files to another folder in the same server. I have written the code but the text files are moving and coping but the remaing file are not moving or coping to another server or different folder. Would you please help on this EX: Server1 and server2 Server1 is having folder abc/bcd/cde and having file .txt,.xls,.eof, etc.. i want to copy into Sever2 as abc/bcd/cde of all above said files and also move to abc/bcd/cde/back in to sever1 Code: #!/bin/sh cd /abc/bcd/cde FTP_SRVR=<host name> FTP_USR=xxxxxx FTP_PWD=zzzzzzzz TODAYS_FILE=&DAY.&HR.&MIN.&SEC ftp -vn <<EOF open $FTP_SRVR user $FTP_USR $FTP_PWD cd /abc/bcd/cde binary mput $TODAYS_FILE bye EOF mv /abc/bcd/cde/$TODAYS_FILE /abc/bcd/cde/back Regards, Sridhar |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
What error do you get?
This looks strange to wrong: Quote:
Code:
TODAYS_FILE=`date +%d.%H.%M.%S` |
|
#3
|
|||
|
|||
|
Hi
I .txt files are copying from sev1 to sev2 but the remaing files are not copying/mvoing to another file and getting error like "mv: cannot rename /sap/DB1/hulftuser1/temp/ to /sap/DB1/hulftuser1/temp/back/tem p/: Invalid argument" could you please help |
|
#4
|
||||
|
||||
|
does the /sap/DB1/hulftuser1/temp/back directory exist?
|
|
#5
|
|||
|
|||
|
hi
Yes it exists.. |
|||
| Google The UNIX and Linux Forums |