Page 1 of 1

run perl file in .bat file

Posted: 11 Feb 2008 18:28
by Kushal
Hi all ,

I want to execute perlfilter.pl file from this .bat file on DOS promt.


I am creating .bat file with following steps
1> Command to make directory with specified date:
set currentdate=%date:~4,2%-%date:~7,2%-%date:~10,4%
MD c:\weblog\rawlogs\%currentdate%


2>change to speciafied directory
C:\weblog\rawlogs\cd %currentdate%

3> Copy files from server
C:\weblog>\PuTTY\pscp.exe -P 2122 servername@paris.hn.unitedlayer.com:/var/log/apache2/wap*.gz

4> command to unzip those files
C:\welog\rawlogs\02-08-2008\gunzip *.gz

5> filtering using perlfilter.pl
Run Perlfilter.pl file from this bat file

Posted: 11 Feb 2008 21:13
by DosItHelp
Kushal,
perl -s perlfilter.pl

Like this? :wink: