Re: how to rename files that contain chinese characters

2011-04-25 Thread Shlomi Fish
Hi eventual, On Monday 25 Apr 2011 06:22:54 eventual wrote: > Hi, > I am using windows operating system. > I wanted to rename some files within certain directories and my files > contain chinese characters. After renaming, I could not see those chinese > characters, what must I do to retain those

Re: how to rename files that contain chinese characters

2011-04-25 Thread eventual
: eventual Sent: Mon, April 25, 2011 11:38:17 AM Subject: Re: how to rename files that contain chinese characters On Mon, Apr 25, 2011 at 12:22 AM, eventual wrote: Hi, >I am using windows operating system. >I wanted to rename some files within certain directories and my files contain >

how to rename files that contain chinese characters

2011-04-24 Thread eventual
Hi, I am using windows operating system. I wanted to rename some files within certain directories and my files contain chinese characters. After renaming, I could not see those chinese characters, what must I do to retain those chinese characters. Below is the file name and the script. Thanks fi

Re: rename files in directory - help

2008-07-15 Thread jet speed
On 7/14/08, Rob Dixon <[EMAIL PROTECTED]> wrote: > > > jet speed wrote: > > > > I put togather few lines of code, I am looking to achieve the below > > > > dir1 with file1, file2 > > dir2 with file1, file2 > > > > i want to copy the files from each of the directory to a third directory > > dir3 a

Re: rename files in directory - help

2008-07-14 Thread Rob Dixon
jet speed wrote: > > I put togather few lines of code, I am looking to achieve the below > > dir1 with file1, file2 > dir2 with file1, file2 > > i want to copy the files from each of the directory to a third directory > dir3 as file1, file2 from dir1 and rename the file1 as file3 and file2 as

rename files in directory - help

2008-07-14 Thread jet speed
Hi All, I put togather few lines of code, I am looking to achieve the below dir1 with file1, file2 dir2 with file1, file2 i want to copy the files from each of the directory to a third directory dir3 as file1, file2 from dir1 and rename the file1 as file3 and file2 as file4 from the dir2. dir

Re: Rename Files

2007-11-20 Thread Dr.Ruud
ure of the best way to do this. I have been trying to use > globbing and substitution (to substitute TEST with nothing). I am > unsure how to rename files in multiple directories. A perfect job for IO::All. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EM

Re: Rename Files

2007-11-19 Thread Chas. Owens
.doc. all files have TEST in the name. > I am unsure of the best way to do this. I have been trying to use globbing > and substitution (to substitute TEST with nothing). I am unsure how to > rename files in multiple directories. > > Thanks > You want the File::Find* module, th

Re: Rename Files

2007-11-19 Thread yitzle
. You can tell Perl to open all the contents of a folder and check if it is a directory or a file (-d or -f). If it is a directory, you recurse. If it is a file, you can use a RegEx to check if it has "TEST" and to remove it. The rename function will rename files for you. -- To unsu

Rename Files

2007-11-19 Thread Allison Baldoni
o use globbing and substitution (to substitute TEST with nothing). I am unsure how to rename files in multiple directories. Thanks

Re: Shortest One-liner to Rename Files

2005-11-12 Thread Randy W. Sims
Wijaya Edward wrote: Hi all, I have a snippet that rename files from: "sth.txt.out" into "sth.out" Now I am really curious how can I make this oneliner "even shorter": $ perl -e ' for(glob ("*.txt.out")){ $out = $_; $out =~ s/\.txt(\.o

Re: Shortest One-liner to Rename Files

2005-11-11 Thread Randal L. Schwartz
>>>>> "Wijaya" == Wijaya Edward <[EMAIL PROTECTED]> writes: Wijaya> Hi all, Wijaya> I have a snippet that rename files from: Wijaya> "sth.txt.out" into Wijaya> "sth.out" Wijaya> Now I am really curious how can I make this Wijay

Re: Shortest One-liner to Rename Files

2005-11-10 Thread John W. Krahn
Wijaya Edward wrote: > Hi John, > > From: "John W. Krahn" <[EMAIL PROTECTED]> > >>mmv '*.txt.out' '#1.out' > > you mean just: > > mv '*.txt.out' '#1.out' > > right ? and not "mmv" No, I meant mmv. $ man mmv MMV(1) NAME mmv - move/copy/append/link multiple files by wildcard pattern

Re: Shortest One-liner to Rename Files

2005-11-10 Thread John W. Krahn
Wijaya Edward wrote: > Hi all, Hello, > I have a snippet that rename files from: > "sth.txt.out" into > "sth.out" > > Now I am really curious how can I make this > oneliner "even shorter": mmv '*.txt.out' '#1.out' &

Shortest One-liner to Rename Files

2005-11-10 Thread Wijaya Edward
Hi all, I have a snippet that rename files from: "sth.txt.out" into "sth.out" Now I am really curious how can I make this oneliner "even shorter": $ perl -e ' for(glob ("*.txt.out")){ $out = $_; $out =~ s/\.txt(\.out)/\.out/; rename ($_,$out);

Re: rename files

2005-05-12 Thread perlocean
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: "Perl Beginners" Sent: Wednesday, May 11, 2005 5:02 PM Subject: Re: rename files [EMAIL PROTECTED] wrote: Hi, Hello, I want to rename all the files in a directory with filenames starting 1.j

Re: rename files

2005-05-11 Thread Jay Savage
On 5/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > - Original Message - > From: "bright true" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: > Sent: Wednesday, May 11, 2005 2:55 PM > Subject: Re: rename files > &

Re: rename files

2005-05-11 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hi, Hello, I want to rename all the files in a directory with filenames starting 1.jpg to n.jpg. Why this code does not rename the files? opendir(DIR, "/tmp") or die "can not open dir: $!\n"; my @files = grep {/.jpg/ } readdir(DIR); closedir(DIR); my $count = 1; foreach (

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: "bright true" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Wednesday, May 11, 2005 2:55 PM Subject: Re: rename files The following would rename any file in a directory (.anything) into numbers in the same extention i hope it

Re: rename files

2005-05-11 Thread bright true
The following would rename any file in a directory (.anything) into numbers in the same extention i hope it will be usfull opendir(DIR,"$dir") or print "$!"; my @content = sort(readdir(DIR)); closedir(DIR); my $no=0; *foreach my* $number (@content){ $no++; $number =~m/\S+\.(\S+)/; rename("$dir/

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:23 PM Subject: Re: rename files - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:08 PM Subject: rename files Hi, I want to rename all th

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:23 PM Subject: Re: rename files - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:08 PM Subject: rename files Hi, I want to rename all th

Re: rename files

2005-05-11 Thread perlocean
- Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, May 11, 2005 2:08 PM Subject: rename files Hi, I want to rename all the files in a directory with filenames starting 1.jpg to n.jpg. Why this code does not rename the files? More on above, All the files are a

Re: rename files

2005-05-11 Thread Octavian Rasnita
1, 2005 10:08 PM Subject: rename files > Hi, > > I want to rename all the files in a directory with filenames starting 1.jpg > to n.jpg. > Why this code does not rename the files? > > opendir(DIR, "/tmp") or die "can not open dir: $!\n"; > my @files = gre

rename files

2005-05-11 Thread perlocean
Hi, I want to rename all the files in a directory with filenames starting 1.jpg to n.jpg. Why this code does not rename the files? opendir(DIR, "/tmp") or die "can not open dir: $!\n"; my @files = grep {/.jpg/ } readdir(DIR); closedir(DIR); my $count = 1; foreach (@files){ print "@files\n"; # wo

Re: Copy and rename files

2005-04-20 Thread JupiterHost.Net
Brian Milbrandt wrote: Please dont' top post :) I appreciate the help, is there a way to do it by taking the source and target directory's as command line arguments? that is how the unix script is written that I am trying to convert. my $source = $ARGV[0]; my $target = $ARGV[1]; may want to add

Re: Copy and rename files

2005-04-20 Thread Brian Milbrandt
: Wednesday, April 20, 2005 3:14 PM Subject: Re: Copy and rename files A correction to the code for 1 line below :-( Chris Hello Brian, I did what you wanted to do on my computer, (Windows XP). The code is pasted below, followed by some explanations. You should be able to get the same results b

Re: Copy and rename files

2005-04-20 Thread Chris Charley
A correction to the code for 1 line below :-( Chris Hello Brian, I did what you wanted to do on my computer, (Windows XP). The code is pasted below, followed by some explanations. You should be able to get the same results by plugging in abc and xyz where I had html and txt. Also, with source a

Re: Copy and rename files

2005-04-20 Thread Chris Charley
- Original Message - From: "Brian Milbrandt" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Tuesday, April 19, 2005 6:22 PM Subject: Copy and rename files I am trying to convert a unix script to perl. The script takes 2 command line arguments, source and targ

Re: Copy and rename files

2005-04-19 Thread Brian Milbrandt
ot;Brian Milbrandt" <[EMAIL PROTECTED]>; Sent: Tuesday, April 19, 2005 5:31 PM Subject: RE: Copy and rename files Wagner, David --- Senior Programmer Analyst --- WGO wrote: Brian Milbrandt wrote: I am trying to convert a unix script to perl. The script takes 2 command line arguments, sour

RE: Copy and rename files

2005-04-19 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Wagner, David --- Senior Programmer Analyst --- WGO wrote: > Brian Milbrandt wrote: >> I am trying to convert a unix script to perl. The script takes 2 >> command line arguments, source and target. I am unable to get the >> file copy and rename function working properly. Here is what I have >> t

RE: Copy and rename files

2005-04-19 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Brian Milbrandt wrote: > I am trying to convert a unix script to perl. The script takes 2 > command line arguments, source and target. I am unable to get the > file copy and rename function working properly. Here is what I have > that is not working properly. > > $target is the target direct

Copy and rename files

2005-04-19 Thread Brian Milbrandt
I am trying to convert a unix script to perl. The script takes 2 command line arguments, source and target. I am unable to get the file copy and rename function working properly. Here is what I have that is not working properly. $target is the target directory variable $source is the source d

Re: Rename files script - a first effort

2003-07-10 Thread John W. Krahn
Pete Emerson wrote: > > John W. Krahn wrote: > > > >Due to way some file systems work I would store the file names in an > >array and use the array to rename the files instead of renaming them in > >the File::Find::find() sub. > > > Can you expand on this a little? Is this a performance issue or a

Re: Rename files script - a first effort

2003-07-10 Thread Pete Emerson
John W. Krahn wrote: Just a couple of comments if you don't mind. (I knew you wouldn't :-) Of course not, that's how I keep on learning! :) Due to way some file systems work I would store the file names in an array and use the array to rename the files instead of renaming them in the File::Fi

Re: Rename files script - a first effort

2003-07-10 Thread Paul Johnson
Barry C.Hawkins said: > On Thursday, Jul 10, 2003, at 13:07 US/Eastern, Pete Emerson wrote: > >> Barry, >> >> I just wrote my own version of your script. Not that it's better than >> yours, just different. I've learned a lot from this list by seeing how >> people do things differently than me! I

Re: Rename files script - a first effort

2003-07-10 Thread John W. Krahn
Pete Emerson wrote: > > I just wrote my own version of your script. Not that it's better than > yours, just different. I've learned a lot from this list by seeing how > people do things differently than me! I hope you find my version helpful. > > A couple of notes about mine: > > 1) The director

Re: Rename files script - a first effort

2003-07-10 Thread Barry C . Hawkins
On Thursday, Jul 10, 2003, at 13:07 US/Eastern, Pete Emerson wrote: Barry, I just wrote my own version of your script. Not that it's better than yours, just different. I've learned a lot from this list by seeing how people do things differently than me! I hope you find my version helpful. A c

Re: Rename files script - a first effort

2003-07-10 Thread Pete Emerson
Barry, I just wrote my own version of your script. Not that it's better than yours, just different. I've learned a lot from this list by seeing how people do things differently than me! I hope you find my version helpful. A couple of notes about mine: 1) The directory is taken from the command

Rename files script - a first effort

2003-07-10 Thread Barry C . Hawkins
Hail to the list! I have just started to learn Perl, but I had a task come up that couldn't wait for my slow progress through Programming Perl, 3rd ed. This script renames files in a specified directory. It seems to work OK, but I am wondering if it could be better. By better, I mean more r