SEARCH YOUR SOLUTION HERE  

Listening for files in a directory

I'm trying to make a solution that can listen for files in a given directory, and process the files as soon they have been written. So far I'm executing the script once per minute, but I would like a realtime ...

Posted On: Monday 26th of November 2012 08:36:47 PM Total Views:  302
View Complete with Replies




Related Messages:

Comparing 2 files using perl   (87 Views)
Guys, I'm a total newbie to perl and I need to know how to go about comparing 2 seperate files using perl, to ascertain if the files are identical or if there are changes. Can you point me in the right direction of the right way to do thisAny guidance / tips would be immensely appreciated.
Format fields in multiple files to Comma separated format.   (114 Views)
In need script for taking field's from multiple files in one directory files have the same "fields".example file:---------------------##### TEST NAME : xxxxxxxx##### TEST OWNER : XXXxxxxxx##### XXX DIGIT IDENTIFIER : AAA, AAA, AAA---------------------Need format , separated starting with the FILENAME in the first field:Need format to look like this------------------------FILENAME, TEST NAME, xxxxxxxx, xxxxxxxx, AAA, AAA, AAAFILENAME, TEST NAME, xxxxxxxx, xxxxxxxx, AAA, AAA, AAAFILENAME, TEST NAME, xxxxxxxx, xxxxxxxx, AAA, AAA, AAAFILENAME, TEST NAME, xxxxxxxx, xxxxxxxx, AAA, AAA, AAA------------------------Hoping someone can help here Given two equally predictive theories, choose the simpler.
Substitution between two files   (104 Views)
Hi ,Lets say I have two files and want to perform a substitution of the data in file1 based on the file2. Based on these initial two files I would like file1 to be changed to what is below. Note: file2 will be about 2500 lines.CODE__file1__2345626122__file2__23, joe45, bob62, pawan61, kimber22, sue-lee..etcCODE__file1-revised__joebobpawankimbersue-le
Orphaned files ( owner deleted)   (94 Views)
I want to write a perl script for the below conditionFiles not contained in the user's home directory and files contained in the user's home directory, and owned by that user(user's account deleted), will remain on the system. The file will still be owned by the deleted account's user ID (UID).I want to throw a warning message whenever files(orphaned files) with no owners (i.e owner's deleted) are exists in the system. , Travis - have a star - a perfect example of using the right tool for the job... Steve"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::PerlDesignPatterns)
comparing 2 files   (113 Views)
i have 2 files and i want to compare i currently cat the files and awk print $1, $2 and doing if file1=file2 then fail, else exit 0what i want to do is compare values, with column 1 being a reference i want to compare line by line and then do:the values not matching is a successthe values matching is failurelike a vlookup in excelfile 1 scott 1.4suzy 3.5josh 5.3amanda 4.2luke 2.1file 2file2scott 4.1suzy 3.5josh 5.3amanda 2.4luke 1.2
Re: How attach files and send mails on perl????   (104 Views)
Armin Garcia wrote: > Hi !!!! , > Well i try to attach a file, but i dont know what function or method i need > to use, here is my code, i hope anybody can help me ....
Comparing files with regular expressions   (215 Views)
, I'm a Perl uber-novice and I'm trying to compare two files in order to exclude items listed on one file from the complete list on the other file. What I have so far prints out a third file listing ...
Re: find files created/accessed in last n hours   (117 Views)
use File::Find can do that. or use the unix 'find' command: find /path -type f -mmin -240 On 4/10/08, nag wrote: > hi, > please help me to get all the files present in a directory which are > ...
Purpose of files in "..\Tk\demos\widget_lib" ?   (64 Views)
I use ActiveState Perl 5.61 on Windows XP. I have a folder "..\Perl\site\lib\Tk\demos\widget_lib" with files like Button.pl and files like mkButton.pl. The files like Button.pl are used in Widget Demonstration programs, like the one by Steve Lidie (Which is ...
How to make all files in one directory to an array   (117 Views)
Hi all, How to form array by using the files available in particular directory for example, /tmp contains the following files.. #ls /tmp example.txt file1.txt file2.txt file3.txt sample.txt www.txt zzz.txt i want to take all the above files in ...
Opening files with interpolation   (88 Views)
I need help opening files. Basically, I have a directory full of html pages. These pages are templates, with variables where i want them. For example, lets say i have a file called test.html in my pages directory, and it ...
chmod or setuid? Need to give script permission to write files   (94 Views)
I am having a perl cgi script that needs to be able to create and write a new file. Is there a way I can use chmod within the script to give temporary world access to my directory, and ...
How to parse out specific data in text files and plugs into thespreadsheet   (123 Views)
I need help writing a script in perl that takes text files and parses out specific data and plugs the data back into the spreadsheet. Can anyone help me on that.
Parsing two files and comparing the first fields..   (73 Views)
I have two files (C:\test1.txt and C:\test2.txt) to parse. The first file has 4 fields and the second one has two fields, but both files have the "user_id" as the first field. Example: c:\test1.txt ================= jcarter john abc@gmail.com mstella mstella ...
FAQ 9.13 How do I edit my .htpasswd and .htgroup files with Perl?   (162 Views)
This is an excerpt from the latest version perlfaq9.pod, which comes with the standard Perl distribution. These postings aim to reduce the number of repeated questions as well as allow the community to review and update the answers. The latest ...
How to generate parser from *.l and *.y files?   (132 Views)
I have input files for lex and yacc (tok.l and gram.y). I could use lex and yacc to generate a parser from these files, but the generated code would be C. Is there a way to directly generate Perl code ...
dealing with large files in perl   (135 Views)
Good day folks, I'm looking for some help and hoping to get some tips back. here's the situation: i've two large files containing one unique value in each file which is the id however, i have to go through each ...
Re: output from multiple files   (128 Views)
On comp.unix.shell, in , "John W. Krahn" wrote: > > > suraj_c@hotmail.com wrote: >> There are three files called first , second and third . Each is having >> three columns >> >> $cat first >> a b c >> ...
filling a select box with a list of files   (399 Views)
I'm looking for a perl script that can fill a "select" box (combo) from a file listing in a particular directory. Can someone direct me to a script that has already been written, or is this easy to do ...
need help with inherited script that emails files   (324 Views)
This perl script goes through a list of files in IFILE and for each file, it sends it on to sendmail. Attachments need special handling and are signified in the email-file by having a line start with 3@ folowed by ...