I've never made a batch file before, so i could do with some help. I want to create a batch file to remotely turn on my server by sending a wake on lan magic packet to it when the batch file is run. I then want it to open a directory on the server.
Heres some pseudo code:
Anyone know how to do this?
This code works if the text file exists but does nothing if it doesn't. The line after the else works on its own though.
I found a cmd line program which will send a wol packet, heres the info. Presumably i can run that if the server directory does not exist.
The point of this is to be able to have my server go into standby after a time and then wake when someone tries to access it. This is the only way i can think of to do that...
Thanks
Heres some pseudo code:
Code:
If exists [server directory\some file or just the directory]
Then open [server root directory]
Else [send wol magic packet or run wol program]
Anyone know how to do this?
This code works if the text file exists but does nothing if it doesn't. The line after the else works on its own though.
Code:
IF EXIST Z:\test.txt start Z:\
ELSE start C:\"Documents and Settings"\Joe\Desktop\WakeOnLan.exe
The point of this is to be able to have my server go into standby after a time and then wake when someone tries to access it. This is the only way i can think of to do that...
Thanks
Last edited: