Hi,
I have written a code for coping the Chrome 'Bookmarks' file to another folder of my system's D drive. Everything works fine but unable to copy the file. Here is the code. Please suggest me where is the problem. I am absolutely new to perl.
use strict;
use warnings;
use File::Copy;
my $src = 'C:\Documents and Settings\npds\Local Settings\Application Data\Google\Chrome\User Data\Default';
my $dst = 'D:\MyDoc\MyFab\Chrome';
opendir(DIR,"$src") or die "Cannot open : $src\n";
my @files = readdir(DIR);
closedir(DIR);
my $a = $files[4]; # This is for the file 'Bookmarks'.
copy($a,$dst) or die "Error coping file : $a\n";
Thanks in advance.
npds
I have written a code for coping the Chrome 'Bookmarks' file to another folder of my system's D drive. Everything works fine but unable to copy the file. Here is the code. Please suggest me where is the problem. I am absolutely new to perl.
use strict;
use warnings;
use File::Copy;
my $src = 'C:\Documents and Settings\npds\Local Settings\Application Data\Google\Chrome\User Data\Default';
my $dst = 'D:\MyDoc\MyFab\Chrome';
opendir(DIR,"$src") or die "Cannot open : $src\n";
my @files = readdir(DIR);
closedir(DIR);
my $a = $files[4]; # This is for the file 'Bookmarks'.
copy($a,$dst) or die "Error coping file : $a\n";
Thanks in advance.
npds