ftp a file after checking the versions not greater then 8 in archive directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ftp a file after checking the versions not greater then 8 in archive directory
# 1  
Old 07-06-2009
ftp a file after checking the versions not greater then 8 in archive directory

Hi ,

I want to write a FTP Script which checks the No of Vesions of the files in Archive Dir and if count >= 8 Delete the oldest file from the Archive Dir and if the count is <= 8 Move the file to the Archive Dir with a CurrentDate concatenation and FTP the file to the FTP directory and send the same file to a email list(group).

Any help will be really appreciated .

Thanks
# 2  
Old 07-06-2009
Better write a script in combination of ssh and scp commands. ftp might be too limited to do things like checking versions etc. Also it is not encrypted.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with korn shell script to get the latest file versions in a directory

I want to write a korn shell script to get the latest three versions for a file in the directory having lot of files with various versions (files with prefix as same but time stamp as suffix) and compress it and at the same time have to remove the remaining versions of the file (other than latest... (4 Replies)
Discussion started by: maheshbabu
4 Replies

2. Shell Programming and Scripting

Checking FTP server file exist or not

I am trying to delete old file in ftp server, after transferring new file successfully . but here i am checking both the file available or not using ls command. if both the file available means i need to get file_new and file_old file size as greater than zero. but i am getting only for... (3 Replies)
Discussion started by: elango963
3 Replies

3. SCO

SCO Versions 5.0.5-5.0.6 or greater?

All, Im endeavoring to do a VirtualBox install on a PC. I have a registerd version 5.0.5. Somewhere on the s forum I recall reading I can upgrade to 5.0.6?? And at a max? without causing any unseen license issues. My questions are. 1: whats the benefit of any versions like 5.0.6 that I might... (4 Replies)
Discussion started by: TheSniper
4 Replies

4. UNIX for Dummies Questions & Answers

look for file size greater than "0" of specific pattern and move those to another directory

Hi , i have some files of specific pattern ...i need to look for files which are having size greater than zero and move those files to another directory.. Ex... abc_0702, abc_0709, abc_782 abc_1234 ...etc need to find out which is having the size >0 and move those to target directory..... (7 Replies)
Discussion started by: dssyadav
7 Replies

5. Shell Programming and Scripting

Checking whether the file exists under a directory and doing a diff

Hi Everyone, I am writing a shell script for the below needs and would like your suggestions and advices. I have a lot of scripting files(Shell Scripts) under the directory: /home/risk_dev/dev I have another directory which has a lot of shell scripts under the directory: ... (2 Replies)
Discussion started by: filter
2 Replies

6. Shell Programming and Scripting

moving log file into Archive directory

Hi All, I'm trying to write a script which will do following : - For any old log under trace directory, if found move it to Archive - Check for a process “process-A” if it is running abort from the script - Else start it up (start_process-A.sh this case) - If it fails to start the... (1 Reply)
Discussion started by: mohullah
1 Replies

7. Shell Programming and Scripting

Checking the size of a file after FTP

Hi I am doing a FTP process through which I am copying a file from my local server to Remote server. After this I want to check the size of the file Below is my program: LOCALDIR=/batch/ediprocess REMOTESERVER=test.appl.com REMOTEPATH=batch/ftpTest LOGIN=px PASSWORD=abcd ftp -n... (3 Replies)
Discussion started by: shanth_chandra
3 Replies

8. UNIX for Dummies Questions & Answers

checking directory size in the text file

Hi All, I am new to unix scripting, please help me in completing this exercise, I have a scenario as follows, 1. i have a text file(snapshot.txt) consisting of directory names, and file size separated by comma as shown below: snapshot.txt data: ... (1 Reply)
Discussion started by: G.K.K
1 Replies

9. UNIX for Dummies Questions & Answers

checking the status of file ftp

Hi, I m new to unix and I need a help in FTp-ing a file. My script is given below ftp -n <<END_SCRIPT open $FTP_HOST user $FTP_USER $FTP_PASSWD lcd $TEMPFOLDER cd $FTP_LOCATION put $1 bye END_SCRIPT exit_status=$? if ; then log "successfully FTPed the file" else... (5 Replies)
Discussion started by: MeeraNair
5 Replies

10. UNIX for Dummies Questions & Answers

Create Year directory, date subdirectory and archive the file

Hi, After checking all the UNIX threads, I am able to come up with a solution so far. I am working on a shell script where it moves the files to a certain directory. The conditions to check are 1) Check if the file exists in the current directory. 2) Check if the destination directory... (2 Replies)
Discussion started by: madhunk
2 Replies
Login or Register to Ask a Question