I have a Windows 2000 machine at a customer that I would like to move log/report files older than three days from one folder on it to a cache folder on the same machine. I want to run a Perl script to do it from a different server running Windows 2008 R2. The reason I want to run it from a different machine is that I do not have Remote Desktop access to the box, nor does it have Perl installed on it. I do have full access to the Windows share where my system's files are stored.
I'm a noob relative to Perl, but I was able to move files on the 2008 R2 server when I run the script on it. Manipulating files on the remote server seems to be the problem.
It seems like it ought to be easy, but I cannot get it to work. Any insights are appreciated.
my $src_dir = '\\\\server_name\\windows_share\\Reports';
my $dst_dir = '\\\\server_name\\windows_share\\Cache\\Reports';
# Move Reports
print "Moving Reports > 3 days old from $src_dir to $dst_dir\n\n";
move $_, $dst_dir if -M > 3;