run perl file in .bat file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Kushal
Posts: 1
Joined: 11 Feb 2008 17:23

run perl file in .bat file

#1 Post by Kushal » 11 Feb 2008 18:28

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

DosItHelp
Expert
Posts: 239
Joined: 18 Feb 2006 19:54

#2 Post by DosItHelp » 11 Feb 2008 21:13

Kushal,
perl -s perlfilter.pl

Like this? :wink:

Post Reply