in reply to Private Utilities
<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:ncopy <files(s)> <target>
So given the files a.txt and b.txt in c:\temp\foo\bar" and calling the script:*0 first directory after root *1 second directory after root ... *-1 first directory above sourcefile *-2 second directory above sourcefile ... *n name of the sourcefile *s0 first suffix of the sourcefile *s1 second suffix oft the sourcefile
As you can see you can easily transform file names while copying.C:\temp\foo\bar>ncopy.pl *.txt .\*1\*n\*-1\t.*s0 mkpath C:\temp\foo\bar\foo\a\bar a.txt -> C:\temp\foo\bar\foo\a\bar\t.txt mkpath C:\temp\foo\bar\foo\b\bar b.txt -> C:\temp\foo\bar\foo\b\bar\t.txt
|
---|