Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: copy script

by prasadbabu (Prior)
on Mar 25, 2010 at 10:58 UTC ( #830821=note: print w/replies, xml ) Need Help??

in reply to copy script

Hi raghu_shekar,

Read all the files in an array. Using perlre match the partial filename with the original file name, as per your requirement. Then using copy function, you can copy to the target location.
For example:

if ($original_filename =~ /$partial_name/){ // add some more conditions to filter further based on your requiremen +t }


Replies are listed 'Best First'.
Re^2: copy script
by raghu_shekar (Novice) on Mar 25, 2010 at 11:02 UTC
    Hi, I have around 10 different directories which im storing in an array and looping through them and trying to find the file. I am sure that there is only one file with the name.. eg <*activ*>. Any easier way how i can fine this one file on the fly without having to store all the files in an array and looping through them..?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://830821]
[1nickt]: Ah, you got Linus' fave? With Ubuntu? 4k display?
[1nickt]: ( The 17" monster I just bought is for my wife, who doesn;t leave the house with it...)
[Corion]: 1nickt: No, I'm using it with Windows 10, but with the 4k display, yes. It's a very nice build IMO, and relatively sturdy. Also, it got 8 or 9 on the ifixit repair scale, which I consider good
[Corion]: ... especially as I expect to have to replace the battery set in two or three years' time
[1nickt]: Nice. So happy that Dells are still user-repairable. Unusual these days.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (12)
As of 2017-03-27 13:10 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (320 votes). Check out past polls.