Re: Fetching File Creation Date

2013-08-21 Thread John Aten
On Aug 19, 2013, at 7:27 PM, beginners-digest-h...@perl.org wrote: > > beginners Digest 20 Aug 2013 00:27:53 - Issue 4569 > > Topics (messages 123372 through 123374): > > Re: Fetching File Creation Date > 123372 by: John Aten > 123373 by: Shawn H Core

Re: Fetching File Creation Date

2013-08-17 Thread Jim Gibson
ime the file is > created, of the format YYYMMDD_HHMMSS. The closest approximation of the file > creation date that I can find thus far is the inode change time returned by > the stat() function. I was under the impression that this would not be too > far off from the first save date,

Re: Fetching File Creation Date

2013-08-17 Thread Shawn H Corey
On Sat, 17 Aug 2013 08:57:14 -0500 John Aten wrote: > Thanks for the reply. I was taking 'creation time' as the time of the > first save. Does that matter? In UNIX et al., there is no such thing. There are 3 times stored in most file systems (FS) under UNIX. atime -- access time, the time of th

Re: Fetching File Creation Date

2013-08-17 Thread John Aten
From: Lawrence Statton Date: August 16, 2013 6:09:15 PM CDT To: beginners@perl.org Subject: Re: Fetching File Creation Date On 08/16/2013 04:25 PM, John Aten wrote: > Does anyone know if this is possible? Or should I just accept the > fact that all dates before 8/2013 are suspect? >&

Re: Fetching File Creation Date

2013-08-16 Thread Lawrence Statton
On 08/16/2013 04:25 PM, John Aten wrote: > Hi all, > [deletia] > Does anyone know if this is possible? Or should I just accept the > fact that all dates before 8/2013 are suspect? > There is no datum that is closely correlated to the "file creation" time. -- To unsub

Fetching File Creation Date

2013-08-16 Thread John Aten
approximation of the file creation date that I can find thus far is the inode change time returned by the stat() function. I was under the impression that this would not be too far off from the first save date, but from what I later read and my experimentation, it seems VERY far off the vast majority of

Re: wait for file creation and wait

2008-11-26 Thread Deviloper
How time-critical is it? is it time-critical as an nuclear chain reaction or time-critical like cooking a gumbo? until ( -e $file) {   sleep(1); } If the resultion of 1 sec is not good enough use time::hires... "Mr. Shawn H. Corey" <[EMAIL PROTECTED]> hat am 26. November 2008 um 16:20 geschr

Re: wait for file creation and wait

2008-11-26 Thread Chas. Owens
On Wed, Nov 26, 2008 at 10:01, Sharan Basappa <[EMAIL PROTECTED]> wrote: > Hi, > > I am writing a scheduler for some proprietary task. > There are two questions pertaining to this > > 1) I have to wait for creation of a file by some external process. How > do I do that in perl? > In other words, is

Re: wait for file creation and wait

2008-11-26 Thread Mr. Shawn H. Corey
On Wed, 2008-11-26 at 20:31 +0530, Sharan Basappa wrote: > Hi, > > I am writing a scheduler for some proprietary task. > There are two questions pertaining to this > > 1) I have to wait for creation of a file by some external process. How > do I do that in perl? > In other words, is it possible t

wait for file creation and wait

2008-11-26 Thread Sharan Basappa
Hi, I am writing a scheduler for some proprietary task. There are two questions pertaining to this 1) I have to wait for creation of a file by some external process. How do I do that in perl? In other words, is it possible to list out the files in perl? 2) If file is not created then I have to w

Re: Monitor a directory for file creation

2008-01-25 Thread Charlie Farinella
but recursively. I found vbs scripts that I know > nothing about but only one directory [no recusion], but wondered if > perl can do it on the MS-windows OS. > > I expected there to be lots of good tools since it would seem kind of > natural for security oriented software to be a

Re: Monitor a directory for file creation

2008-01-24 Thread Jenda Krynicky
ipts that I know > nothing about but only one directory [no recusion], but wondered if > perl can do it on the MS-windows OS. > > I expected there to be lots of good tools since it would seem kind of > natural for security oriented software to be able to notice file > crea

Re: Monitor a directory for file creation

2008-01-24 Thread reader
tle about how to set it up? I spent most of a day trying to find something that will notice when files are created but recursively. I found vbs scripts that I know nothing about but only one directory [no recusion], but wondered if perl can do it on the MS-windows OS. I expected there to be l

Re: Monitor a directory for file creation

2008-01-23 Thread alwaysonnet
I've set of questions. 1) You want a perl script to monitor a particular directory 2) if so, we can make this script as a daemon so that it monitors the folder for the file. here is the sample code... #!/usr/bin/perl use strict; while (1) { # Monitor the folder here if (-e "/pat

Re: Monitor a directory for file creation

2008-01-16 Thread Charlie Farinella
On Wednesday 16 January 2008, Peter Scott wrote: > On Tue, 15 Jan 2008 15:13:29 -0500, Charlie Farinella wrote: > > I need to monitor a directory and when a file is created, modify it. > > I've been playing with Linux::Inotify2 and may be able to make that > > work, but am wondering if this is s

Re: Monitor a directory for file creation

2008-01-16 Thread Peter Scott
On Tue, 15 Jan 2008 15:13:29 -0500, Charlie Farinella wrote: > I need to monitor a directory and when a file is created, modify it. > I've been playing with Linux::Inotify2 and may be able to make that > work, but am wondering if this is something that people do routinely. > > My search at CPAN

Re: Monitor a directory for file creation

2008-01-15 Thread Tom Phoenix
On Jan 15, 2008 12:13 PM, Charlie Farinella <[EMAIL PROTECTED]> wrote: > I need to monitor a directory and when a file is created, modify it. The trouble isn't noticing when it's been created; the trouble is in noticing when it's *done* being created. (I doubt whether this is completely solved by

Monitor a directory for file creation

2008-01-15 Thread Charlie Farinella
Hi, I need to monitor a directory and when a file is created, modify it. I've been playing with Linux::Inotify2 and may be able to make that work, but am wondering if this is something that people do routinely. My search at CPAN wasn't particularly fruitful. thanks, -- -

Re: How to detect a file creation

2006-11-17 Thread Jay Savage
On 11/17/06, Mário Gamito <[EMAIL PROTECTED]> wrote: Hi, I need to write a script that detects when a file is created in a certain directory and then e-mail it. I thought about fam. Problem is the machine is a AIX and it doens't have fam. I think in PERL is possible to do the trick. I don't k

Re: How to detect a file creation

2006-11-17 Thread Tom Phoenix
On 11/17/06, Mário Gamito <[EMAIL PROTECTED]> wrote: I need to write a script that detects when a file is created in a certain directory and then e-mail it. Sending a file by e-mail is the easy part. You'll need to work on "when a file is created". For example, if I were to run some big, slow

How to detect a file creation

2006-11-17 Thread Mário Gamito
Hi, I need to write a script that detects when a file is created in a certain directory and then e-mail it. I thought about fam. Problem is the machine is a AIX and it doens't have fam. I think in PERL is possible to do the trick. I don't know in advance the name of the files that are created.

Re: CSV File Creation

2003-01-19 Thread R. Joseph Newton
A slightly corrected version of my _CSV with commas in the fields_ solution: sub DataPrint { my($Handle, $key, $hashref) = @_; my $Data = $$hashref{$key}; $Data =~ (s/,/%2C/g); print $Handle "$Data,"; } Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: CSV File Creation

2003-01-19 Thread R. Joseph Newton
"Is a CSV a comma delimited list. If so when creating a CSV how does one cope with fields that have commas in them.[?]" Hi Colin, Sorry for the late response. I forgot the solution I had come up with earlier. I used in a project that I tabled while I was working on another one. Try(on the lo

Re: CSV File Creation

2003-01-15 Thread zentara
On Wed, 15 Jan 2003 08:46:04 +1100, [EMAIL PROTECTED] (Colin Johnstone) wrote: >Is a CSV a comma delimited list. If so when creating a CSV how does one cope with >fields that have commas in them. > >An address filed for example could be written suite 2, lvl 3. > >Do you write the field names out

RE: CSV File Creation

2003-01-14 Thread Bob Showalter
Jenda Krynicky wrote: > ... > my $outString = join(',', > map {$fields{$_}} qw(SelectCity Workshop1 Workshop2 Salutation > FirstName LastName Title CompanyName > CompanyAddress Suburb State > PostCode PhoneNumber Mobile EmailAddress) > ); Or a hash slice:

Re: CSV File Creation

2003-01-14 Thread Paul Johnson
On Tue, Jan 14, 2003 at 10:57:13PM +0100, Jenda Krynicky wrote: > From: "Johnstone, Colin" <[EMAIL PROTECTED]> > > > > my $outString; > > $outString = ""; > > $outString .= $fields{'SelectCity'} . ","; > > $outString .= $fields{'Workshop1'} . ","; > > $outString .= $fields{'Workshop2'} . ","; > >

Re: CSV File Creation

2003-01-14 Thread Jenda Krynicky
From: "Johnstone, Colin" <[EMAIL PROTECTED]> > Is a CSV a comma delimited list. If so when creating a CSV how does > one cope with fields that have commas in them. > > An address filed for example could be written suite 2, lvl 3. > > Do you write the field names out with quotes around them? Yes

RE: CSV File Creation

2003-01-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Johnstone, Colin wrote: > Gidday all, > > Is a CSV a comma delimited list. If so when creating a CSV how does > one cope with fields that have commas in them. > > An address filed for example could be written suite 2, lvl 3. > > Do you write the field names out with quotes around them? > > >

CSV File Creation

2003-01-14 Thread Johnstone, Colin
Gidday all, Is a CSV a comma delimited list. If so when creating a CSV how does one cope with fields that have commas in them. An address filed for example could be written suite 2, lvl 3. Do you write the field names out with quotes around them? my $filename; $filename = "/home/bdweb8083m

RE: File Creation

2002-07-02 Thread Jeff 'japhy' Pinyan
On Jul 2, William J Black said: >Is there a way to tell when a file was first created? Depends on the OS. Unix doesn't keep track of that, but Windows does; you'll need to use some specific Win32:: module for that info, I'd guess. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.

RE: File Creation

2002-07-02 Thread William J Black
Is there a way to tell when a file was first created? William Black Duke Energy 401 S. College St. Charlotte NC (704) 382-3787 Voice -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: File creation...

2001-12-11 Thread Bob Showalter
> -Original Message- > From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 11, 2001 12:37 AM > To: [EMAIL PROTECTED] > Subject: RE: File creation... > > > Dan, > > Just figured it out... > > my $backup = #Dir in hash s

RE: File creation...

2001-12-10 Thread Daniel Falkenberg
Dan, Just figured it out... my $backup = #Dir in hash somewhere. Not important -T $backup || open(BACKUP, ">/tmp/passwd_backup"); Very, very cool! Cheers, Dan Hi all, I want my perl code to be able to check to see if a file exist and if the file doesn't exist I want that file to be c

File creation...

2001-12-10 Thread Daniel Falkenberg
Hi all, I want my perl code to be able to check to see if a file exist and if the file doesn't exist I want that file to be created. What would be my best way of going about this? Something like... $backup_file = $conhash{$title}{'Linux Passwd Backup'}; #Grab location from a directory located

Re: Perl file creation

2001-10-30 Thread Scott Lutz
I have no choice. I run it from a web browser, so it takes the www:www permissions that the machine gives it. - Original Message - From: "_brian_d_foy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 1:06 PM Subject: Re: Perl file c

Re: Perl file creation

2001-10-30 Thread _brian_d_foy
In article <007101c1617a$9fd47590$58644c18@windomain>, [EMAIL PROTECTED] (Scott Lutz) wrote: > I have a Perl script that is creating files. The only problem is that > they are being created with the wrong username:group. Any idea as to > why this is happening, and an easy way to fix it? do yo

Perl file creation

2001-10-30 Thread Scott Lutz
I have a Perl script that is creating files. The only problem is that they are being created with the wrong username:group. Any idea as to why this is happening, and an easy way to fix it? --- scott lutz ---

Log file creation

2001-07-03 Thread Tim Musson
perlpeople, Is it better to open a log file only when I need to write to it, or open it at the start, and close when done? A few thousand lines in the log... -- [EMAIL PROTECTED] Using The Bat! eMail v1.53d Windows NT 5.0.2195 (Service Pack 1) When in doubt, think.