Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Private Utilitiesby holli (Abbot) |
on Dec 01, 2005 at 16:55 UTC ( [id://513344]=note: print w/replies, xml ) | Need Help?? |
This is a little helper named ncopy. It copies files from one place to another.
Syntax: <files(s)> is just a filename (wildcards possible) and <target> is an expression for the target of the copy operation. So far there is nothing new. Here comes the interesting part: In the target expression you can use the following to refer to parts of the source path and name: So given the files a.txt and b.txt in c:\temp\foo\bar" and calling the script: As you can see you can easily transform file names while copying. It's only tested under Windows, but should be cross platform. holli, /regexed monk/
In Section
Meditations
|
|