Re: How to open a file in a folder but without knowing its name



On 8/16/07, praboona@xxxxxxxxx <praboona@xxxxxxxxx> wrote:
Dear All,

I am a beginner in Perl..

I need a perl script to open a file from a specific folder where the
script is.

Note:That folder will always have one file but with different name and
with same extension.

I also have to get the name of that file and rename it by adding some
characters to the old name of the file after doing some data
manipulation in that file.

Please guide me in this regard..

I am awaiting your replies ASAP...

Thanks in Advance..

Take a look at glob, regexes, and rename:

perldoc -f glob
perldoc perlre
perldoc -f rename
.



Relevant Pages

  • Re: How to open a file in a folder but without knowing its name
    ... I need a perl script to open a file from a specific folder where the ... I also have to get the name of that file and rename it by adding some ... Please post code. ...
    (perl.beginners)
  • Re: How do you manage renaming files?
    ... folder, that say, your camera has named, when the folder ... already contains files the same camera has named the same thing ... Rename them first by using a program like 'A Better Finder ... there's always the quick and dirty Perl script - my favorite. ...
    (comp.sys.mac.system)
  • Re: get text files from a folder
    ... You can install Perl package and do it by perl script. ... the file names and quantity and rename the file names to meet your DTS ... > My problem is that many files can be inside the folder and their names are ...
    (microsoft.public.sqlserver.dts)
  • Re: Re-accruing photos in a slideshow
    ... > numerical order and then select this new folder for screen saver but you ... > still will not get the photos to displayed in order. ... > If you want to try it, you can batch rename very quickly using XP. ... > in the order you placed the thumbnails. ...
    (microsoft.public.windowsxp.photos)
  • Re: Creating slideshows in XP
    ... familiar with the Irfanview software, which lets you gather a particular set ... the pictures, and then it closes, i.e. doesn't do a continuous loop. ... I can take that new folder with the renamed files you mentioned and convert ... > If you need to batch rename and number, you can do this easily with XP. ...
    (microsoft.public.windowsxp.photos)