im hav one requirement, let me explain my requirement.
my script will run every one hour and it wil pull files from remote server to my local server.but the d files hwich are pulled my not be in required format wht im expecting in my server.
but in my sever in particular dierectory i wil hav a set of list files, like acd.txt,zyx.dat,...
in which abc.txt will hav all the .txt extensin files in that list files.same as the others list files.
but the probles is file names will not be static...the file name which are pulled will hav some time stamp appending in d end to the file name but in the list files it wont have that time stamp in that list files.
some sample files which i pulled:
KI.P.PYM.NDM.MCSNGLCO.CYCJ003.201212.dat.gz
BADKI.P.PYM.NDM.MCSNGLVW.CYCJ002.201206.dat.gz
KI.P.PYM.NDM.MCSNGLVW.CYCJ002.201210.dat.gz
PX.P.D15.PXLV3015.VZ450.201210.adt
PX.P.D20.PXLV3020.VZ450.201212.adt
VGWNY0PN.FTP.MCIXP31A.SHIP.J12335.AUDITSUM
but in the list files it will be:
OV_GOLDMINE_BTN_.txt
VZDWH_Opportunity_.txt.gz
VZDWH_Event*.txt
ez_pipeline_VZT_D_.txt.gz
sopl_.txt
and finally we hav to see the pulled file is of required format or not i.e, it is ziped or unzip files
according to list file name we hav to do that to.
> you have a file named "files.list" (changed for better understanding)
> you pull several files every hour from a remote server to your local
> you don't want the files that are not in the format listed in "files.list"
correct???
Answer these:
You know the format of files that you need. Then why are you pulling other files as well?
So after identifying the unnecessary files what are you planning to do about them?
> you have a file named "files.list" (changed for better understanding)
no their wil be many list file based on type of file in one directory
> you pull several files every hour from a remote server to your local
ya script wil pull server files and we hav to check those files across this list files
> you don't want the files that are not in the format listed in "files.list"
ya i want those files
You know the format of files that you need. Then why are you pulling other files as well?
no i dont know the format of files,i simple pull files which are present in that remote dir to my dir.
So after identifying the unnecessary files what are you planning to do about them?
i want those files
---------- Post updated at 12:47 PM ---------- Previous update was at 12:42 PM ----------
i hav to compare the pulled file name against the list files available in the directory.
but i told previously in d post
file names are not static so how to search the file names in the list files?
please help
i wil maintain list files based on type of files.
i know about the file names which i gonna pull.
so it is easy to maintain list of file names in the list files so
if i suppose to pull
1.txt
2.xls
3.csv
4.txt
5.dat.gz
6.dat
7.Z
8.log
9.c
10.doc
than i wil have 10 different list files with their file names bases up on type of file.
list files are fixed.
i know waht file i wil pull
i iwl configure those files in tht list files