I want to connect to putty and want to do few step:

login to Putty
type few command to bring down the server
Traverse to the particular path
Remove the file from the directory
Again start the server

I need to write the code in windows. But my server is in linux.
How shall I proceed?
Thanks in advance
you can use code similar to:
command = "plink.exe -ssh username@" + hostname + " -pw password -batch \"export DISPLAY='" + hostname + "/unix:0.0' ; "
which will open an ssh to the desired hostname using username and password
shutdown:
command += "sudo /sbin/halt\""
reboot:
command += "sudo /sbin/reboot\""
add your other commands using the same method as above,
run the command with:
pid = subprocess.Popen(command).pid
As pointed out by Tadeck, this will only work on a windows machine attempting to connect to a linux machine.
Connect to putty and type few command