Re: renaming a file while using copy using regex

2007-07-18 Thread Paul
On Wed, July 18, 2007 3:58 pm, John W. Krahn wrote: > Paul wrote: >> I have a line that is reading files from and array and copying to a >> different directory. Is there a way to rename the file with regex at >> the >> same time? > > No, you have to store the modified file name in a different vari

Re: renaming a file while using copy using regex

2007-07-18 Thread Chas Owens
On 7/18/07, Paul <[EMAIL PROTECTED]> wrote: I have a line that is reading files from and array and copying to a different directory. Is there a way to rename the file with regex at the same time? I'm wanting to remove spaces only in the filenames with: s/\ //g My copy line reads: copy( "$dir/$

Re: renaming a file while using copy using regex

2007-07-18 Thread John W. Krahn
Paul wrote: I have a line that is reading files from and array and copying to a different directory. Is there a way to rename the file with regex at the same time? No, you have to store the modified file name in a different variable. I'm wanting to remove spaces only in the filenames with: s

renaming a file while using copy using regex

2007-07-18 Thread Paul
I have a line that is reading files from and array and copying to a different directory. Is there a way to rename the file with regex at the same time? I'm wanting to remove spaces only in the filenames with: s/\ //g My copy line reads: copy( "$dir/$file", "$newdir/$file" ); If I need to work w

RE: renaming a file

2005-01-14 Thread Wagner, David --- Senior Programmer Analyst --- WGO
S E wrote: > Hello, > > I've been trying to apply my fledgling PERL skills to this task which > I have encountered a bit of a roadblock. What I want to do is rename > 20-100 files in two different directories that are created every > morning. They come in a name format such as these: > > 1st

renaming a file

2005-01-14 Thread S E
Hello, I've been trying to apply my fledgling PERL skills to this task which I have encountered a bit of a roadblock. What I want to do is rename 20-100 files in two different directories that are created every morning. They come in a name format such as these: 1st directory: ABCDEF.12152005

Re: Creating or renaming a file with the creation date included (Impossible?)

2004-07-08 Thread jason corbett
So I guess to automate a script daily, and save it under a name that includes the date can only be done with "rename()" function? Or is there a work around that includes a module? If so, please let me know. Regards. JC "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote: > "Jason" == Jason Corb

Re: Creating or renaming a file with the creation date included......

2004-07-07 Thread Randal L. Schwartz
> "Jason" == Jason Corbett <[EMAIL PROTECTED]> writes: Jason> How can i rename a file or create a file with the date Jason> included? For example, I want to automate and run reports and Jason> save the reports under the date of when they were created Jason> i.e. JC07082004. Whats the easiest w

RE: Creating or renaming a file with the creation date included......

2004-07-07 Thread Wiggins d Anconia
Please bottom post > > thanks. I wasn't aware of the rename function. As far as converting to MMDD, can that be done on the fly using localtime()? I am reading online docs now, but nothing talks about it done on the fly i.e. when I call the function up. If not I will work on it some more

RE: Creating or renaming a file with the creation date included......

2004-07-07 Thread jason corbett
thanks. I wasn't aware of the rename function. As far as converting to MMDD, can that be done on the fly using localtime()? I am reading online docs now, but nothing talks about it done on the fly i.e. when I call the function up. If not I will work on it some more and follow up with whateve

RE: Creating or renaming a file with the creation date included......

2004-07-07 Thread Wiggins d Anconia
> jason corbett wrote: > > How can i rename a file or create a file with the date included? For > > example, I want to automate and run reports and save the reports > > under the date of when they were created i.e. JC07082004. Whats the > > easiest way to do this? > > > > Thanks, > > JC > >

RE: Creating or renaming a file with the creation date included......

2004-07-07 Thread Wagner, David --- Senior Programmer Analyst --- WGO
jason corbett wrote: > How can i rename a file or create a file with the date included? For > example, I want to automate and run reports and save the reports > under the date of when they were created i.e. JC07082004. Whats the > easiest way to do this? > > Thanks, > JC Using localtim

Creating or renaming a file with the creation date included......

2004-07-07 Thread jason corbett
How can i rename a file or create a file with the date included? For example, I want to automate and run reports and save the reports under the date of when they were created i.e. JC07082004. Whats the easiest way to do this? Thanks, JC

Re: Renaming a File in Win32.

2002-07-29 Thread Connie Chan
If you are using a Apache server on Win32, the log file will be LOCKED during its running. So you cannot rename, unlink or open for edit on it. you can only open it for read only. Maybe you can copy, I don't know. rename ($file, $newfile) or die ".. $!"; # may help to see what's the problem

Renaming a File in Win32.

2002-07-29 Thread Denham Eva
Hello Listers, Could someone answer this for me please, I have written a script to rename a logfile (text file). I have used the rename function - but the documentation warns of issues depending on OS patform and then links to Win32:Copyfile and mentions having to unlink yourself. This is all fin

Re: Renaming a File

2002-04-10 Thread Paul Johnson
On Wed, Apr 10, 2002 at 10:11:28AM -0400, Craig Sharp wrote: > Allison, > > Try this script. I found it out on the net. My need was to rename a > set of files but I don't see any reason that this couldn't rename a > single file. > > #!/usr/local/bin/perl > # > # Usage: rename perlexpr [files]

RE: Renaming a File

2002-04-10 Thread Timothy Johnson
ge- From: Allison Ogle To: a a Sent: 4/10/02 7:05 AM Subject: Renaming a File Hi, I am trying to open a file which has no file extension. (For example ABC ). What I want to do is rename the file with a file extension. (For example ABC.dat). Does anyone know how to do this? Thanks,

Re: Renaming a File

2002-04-10 Thread Michael Stidham
Try : perldoc -f rename HTH - Mike >From: "Allison Ogle" <[EMAIL PROTECTED]> >To: "a a" <[EMAIL PROTECTED]> >Subject: Renaming a File >Date: Wed, 10 Apr 2002 10:05:48 -0400 > >Hi, > >I am trying to open a file which has no file extens

Re: Renaming a File

2002-04-10 Thread Craig Sharp
Allison, Here is the link for more information on the script. http://www.evolt.org/article/Renaming_Files_with_Perl/17/351/ Craig A. Sharp Unix Systems Administrator DNS Administrator Roush Industries Office: 734-466-6286 Cell: 734-231-6769 Fax: 734-466-6939 [EMAIL PROTECTED] ==

Re: Renaming a File

2002-04-10 Thread Felix Geerinckx
on Wed, 10 Apr 2002 14:05:48 GMT, Allison Ogle wrote: > What I want to do is rename the file with a file extension. ^^ perldoc -f rename -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Renaming a File

2002-04-10 Thread Craig Sharp
Allison, Try this script. I found it out on the net. My need was to rename a set of files but I don't see any reason that this couldn't rename a single file. #!/usr/local/bin/perl # # Usage: rename perlexpr [files] ($regexp = shift @ARGV) || die "Usage: rename perlexpr [filenames]\n"; if (

Renaming a File

2002-04-10 Thread Allison Ogle
Hi, I am trying to open a file which has no file extension. (For example ABC ). What I want to do is rename the file with a file extension. (For example ABC.dat). Does anyone know how to do this? Thanks, Allison -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: