Hi guys,
Im trying to write a perl code to do the following task.
prerequisites:-
1) some media files(say boys.mp3 or gaga.mpeg or snoop.flv) is located in C:\videos\
2) The perl code is also located in same location C:\videos\
when I execute this perl code, it should ask for a number say 100 or 200 or even 5000 for variable n and a filename that is located in C:\videos\
and then it should duplicate that file n number of times and rename all the files with some random filenames.
Say if snoop.flv is given and n=5 then it should duplicate 5 times and rename it
eg:-
aksjg.flv
ojregnos.flv
aeofasjdavsf.flv
wajgtoih.flv
lkfj.flv
#!/usr/bin/perl
use File::Copy;
$filetobecopied = "myhtml.html.";
while(n<500)
{
$random_generated_name = Generate a random string here
$newfile = $random_generated_name".html.";
copy($filetobecopied, $newfile) or die "File cannot be copied.";
random_generated_name = " ";
}
This is basic outline.. But I did not start coding this.