@echo off
TITLE test
if exist http://www.eliteknifesquad.com/EKSwall.zip goto exit
:exit
DEL "C:\Documents and Settings\Billy\Desktop\del\del.txt"
Either way it's going to delete that file. After the goto, you need to stop the rest of the code from running, or it will. Dos keeps running the commands in order as listed unless you direct it otherwise.
Like this example:
Code:
if exist http://www.eliteknifesquad.com/EKSwall.zip goto last
exit
:last
DEL "C:\Documents and Settings\Billy\Desktop\del\del.txt"
You can use WGET with the Spider Switch ( no file is downloaded) and the -o switch to output to a text file. (to capture the Server Response) Then you can use the find utility to check the output file for Not Found to determine if the File was found or not and act accordingly.
That link is to some code which would be used if you had a programming language named BlitzBasic installed.
They happened to have written the code and named the function If Exist as a coincidence.
However, Windows won't know what to do with that code unless it's used with the correct files installed to interpret.
Mo
Status
Not open for further replies.
You have insufficient privileges to reply here.
Related Threads
?
?
?
?
?
Tech Support Guy
9.9M posts
860K members
Since 1998
A forum community dedicated to tech experts and enthusiasts. Come join the discussion about articles, computer security, Mac, Microsoft, Linux, hardware, networking, gaming, reviews, accessories, and more!