scan directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scan directory
# 1  
Old 03-03-2009
scan directory

The script should
_scan a specific directory
_If a file name is like one provided, then run the command to send the file via CFT
The name should be picked from a list. The current list is :
BENEFI.TXT,DPTERM.TXT,PROFIL.TXT,CLIENT.TXT,COABON.TXT,AUTTFI.TXT,CARTES.TXT,IMPMCF.TXT,AUTINT.TXT,M ESSAG.TXT,RVLCPT,COMPTE.TXT
Remark : if there are several files selected, the files should be renamed and sent one after the other
Ie : the folder contains 2 files MESSAG.TXT.200812191456 and MESSAG.TXT.200812191105 which are like MESSAG.TXT* . Those 2 files should be renamed to MESSAG.TXTand sent one after the other
_rename the file to prefix it with yyyymmddhhmm and move it to an archived folder
# 2  
Old 03-03-2009
CFT is working in asynchronous mode : if you rename your 2 files MESSAGE.TXT.xxx and MESSAGE.TXT.yyy to MESSAGE.TXT you'll overwrite the first one !

Give me the PART name and the IDF used, and I'll help you. Smilie
# 3  
Old 03-03-2009
files selection

i first want to deal with the files selection.
i create a file "files_list.txt" wich contains the files to be sent. my problem now is to see if the file exists two times (example:CLIENT.TXT.565656 and CLIENT.TXT.686868 and renaming them). here is my code.
can you help me please?

for MYFILE in `awk '{ print $1 }' files_list.txt`
do
find ./ascii -name $MYFILE* -print>>dir_list.txt
echo "Ok"
done
# 4  
Old 03-03-2009
PART is SABDE and idf is %%e
# 5  
Old 03-04-2009
Quote:
Originally Posted by fireit
PART is SABDE and idf is %%e
Could you please say me if, on the side of the partner SABDE he will exploit the &NFNAME symbolic variable of CFT ?

Did you define a CFTSEND for your IDF "%%E" (strange id Smilie) ?

Waiting for your answer. Smilie
# 6  
Old 03-05-2009
yes

yes. he will exploit the &NFNAME symbolic variable of CFT.
no, i didn't define CFTSEND for IDF "%%E"
# 7  
Old 03-05-2009
Goldorekk, don't abandon me
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create automated scan of specific directory using bash

I am trying to use bash to automate the scan of a specific directory using clamav. Having this in place is a network requirement. The below is an attempt to: 1. count the extensions (.txt, .jpeg) in a directory and write them to a virus-scan.log (section in bold) 2. scan each folder in the... (6 Replies)
Discussion started by: cmccabe
6 Replies

2. UNIX for Dummies Questions & Answers

best way to scan?

i want to scan all open and closed ports on a server. how can i do this. i intend on using nmap, but if there are better ways to do it, please let me know. i understand there are a total of 6335 allowable ports on a server. so out of that 6335, i want to know which is open or closed. id... (1 Reply)
Discussion started by: SkySmart
1 Replies

3. AIX

Scan Rate

Hello, How can i tell ifthe ratio between fr and sr is ok? is fr/sr ratio of 0.9 acceptable? thanks. (1 Reply)
Discussion started by: LiorAmitai
1 Replies

4. Red Hat

Scan For new LUNS

In Solaris the administrator has to update /kernel/drv/sd.conf file to tell the sd driver to scan for a broader range of scsi devices. Can someone please tell me what file needs to be update in Redhat Linux 5 for the same. Second part of the question is WWN for HBA's can be found (atleast in my... (1 Reply)
Discussion started by: Tirmazi
1 Replies

5. Shell Programming and Scripting

scan compressed

Hello all I want to help I have some compressed files on the system When you want to unzip these files Delete any file which symlink "ln -s" {{ I need script is necessary Script contain: Any operation to decompress the system is doing to delete any symlink... (0 Replies)
Discussion started by: x-zer0
0 Replies

6. Shell Programming and Scripting

A script to scan a directory for XML files,

Hi, I am fairly new to unix/linux scripting (about 1 week) and have written a script to scan a directory for xml files, if found call and oracle procedure passing in the file name and then move the file once processed to an archive area. Now everything seems to be working except when there... (3 Replies)
Discussion started by: apacheuk
3 Replies

7. Shell Programming and Scripting

Scan directory and sub directories

I am really stuck on a issue and have not been able to find a solution. With the code below I need to not only scan the current directory which as you can see below is... /lcl/sit/apps/Tivoli/ But I also want it to scan all sub directories it finds under Tivoli as well for the same thing... (2 Replies)
Discussion started by: LRoberts
2 Replies

8. UNIX for Dummies Questions & Answers

scan and move

i have a script to look for a file, but it moves a file that's being used. i want to use: if file exists > 0, and not being updated/used in the last 2 minutes, move to /tmp i can do this much: if then mv filename.txt /tmp else exit fi or how can i check if... (3 Replies)
Discussion started by: tjmannonline
3 Replies

9. UNIX for Advanced & Expert Users

Please let me know Regarding Port Scan

Can any one please let me know below ones 1) How to Perform the Port Scan in Solaris Environment and how to block the unwanted Ports. 2) How to know whether particular Port is listning the requests or not? Thanks Ramkumar.B (7 Replies)
Discussion started by: myramkumar
7 Replies

10. UNIX for Dummies Questions & Answers

IP Name scan

Hi. how to search a range of IP:s for their registed IP names? Like nslookup or host for all IPs 130.xxx.xxx.1 to 130.xxx.xxx.254 //nicke (2 Replies)
Discussion started by: nicke30
2 Replies
Login or Register to Ask a Question