Perl directory watcher and sender using pscp
This perl program is use for monitoring directory, and doing upload if any matched kind of file using pscp.exe. This program is running on Win32 platform #! perl use warnings; #use strict; use feature "switch"; use Win32::OLE qw(in); use File::Copy; my $app_dir = "C:/EXEC_NEW"; my $raw_dir = "C:/RAW_EOS"; my $arch_npoess = "C:/ARCH_NPOESS"; my $arch_fy = "C:/ARCH_FY"; my $dest = "192.168.20.101"; my $dest_dir = "/raid/raw"; my $dest_acc = "ipopp"; my $dest_access = "*****"; my $dest_addr = "ipopp\@192.168.20.101:/raid/raw"; my $uploaded_file = ""; chdir $app_dir or die "Directory not found"; PARENT: while() { #check pscp #check EOSingest sleep(6); if(matching_processes (qr/EOSingest/)) { print "Retreiving RAW file, please wait ...\n"; next; } if (matching_processes (qr/pscp/)) { print "Uploading $uploa...