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
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/$
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
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
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
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
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
> "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
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
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
> 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
>
>
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
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
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
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
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]
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,
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
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]
==
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]
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 (
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:
22 matches
Mail list logo