Are the logs in a shared directory? In that case, you can treat it as a network drive and deal with it as if it was a local file.
You can also use AT to schedule zipping the file from the command line. How you afterwards fetch it over the network depends on what means you have available. | [reply] |
Hi Bart Monk
The Logs are not in shared directory.
Its from a log server from which we have to push to another server.both running windows.
| [reply] |
Then click Start->run, enter \\remote_server\C$, hit return, answer the username/password dialog;
open the Log folder in the explorer, right-click->copy, go to your local machine, right-click->paste, zip, copy back. What else?
Ah, there's Remote Desktop also, which allows you to forward a local directory to the remote server.
Or install an ssh server on the remote boxes, and do that with pscp.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
| [reply] [d/l] |
| [reply] |
You can use WMI scripts to make this work dude as both are windows mak
| [reply] |
The age of a file can be determined using ( -M path ) whereas it's modification date can be extracted using the stat() function.
I would suggest using Archive::Tar to archive the files into a single file and then Archive::Zip to zip the resulting tar file. These facilities are open-platformed.
| [reply] |
Good one Mr.Moron
i will certainly give it a try
| [reply] |
Beware of assuming that all days have 24 hours. Since you are using the localtime() function, most days will have 24 hours as expected, but some days will have 25 hours (autumn DST change), and some days will have 23 hours (spring DST change). This little oversight bit me in back side last year.
If you run your script just after midnight, your date calculation will be an entire day off when it runs on the morning following the fall DST change.
| [reply] |