I want to make a .bat to copy & rename a file multiple times. I want to have a list of names, and an original file, then I want to copy that file and rename it for each name on the list.
How I can do this using a .bat file?
Also is it possible to run winrar fromthe .bat to .rar or .zip every file after copying/renaming?
Example:
$file = "file.tmpl";
$names = "name1, name2, name3, nameetc";
foreach( $names as $name) {
copy $file; //to avoid deleting the original
rename $file to $name;
zip $name; //I dont really need this but if its easy to do i will like to use it
}
So I start with a file.tmpl and I end up with 4 more files (which are a duplicate of file.tmpl) called name1, name2, name3, nameetc.
The example is not a real coding lang, I used a sort of php sintax because is the language I know more.