dos programming
This is about scheduling download on remote vista machine via telnet.
I wanted to give link , file name & time as input to script which will start background process executing batch file ( created by script ) on schedule.
After an hour I came out with
You can keep feeding links .
I got
touch (http://unxutils.sourceforge.net/)
wget (http://gnuwin32.sourceforge.net/packages/wget.htm)
chp (http://www.commandline.co.uk/chp/)
for vista from unixutils
These applications are crafty. Thanks to developers.
You can use
I wanted to give link , file name & time as input to script which will start background process executing batch file ( created by script ) on schedule.
After an hour I came out with
Code:
Tree <dir> bat <dir> log <dir> done template.bat chp.exe wget.exe touch.exe template.bat CODE :while set /p name=file name (write end to exit) :- if %name%==end goto stop echo cd <folder-containing-batch-files> > bat\%name%.bat echo <drive-letter>: >> bat\%name%.bat set /p link=URL:- echo wget %link% -a logs\%name%.log >> bat\%name%.bat echo touch done\%name%.done >> bat\%name%.bat time /t @this is current time set /p tod=time to schedule job :- at %tod% <full path of chp.exe> cmd /c <full path of %name%.bat> goto while :stop
I got
touch (http://unxutils.sourceforge.net/)
wget (http://gnuwin32.sourceforge.net/packages/wget.htm)
chp (http://www.commandline.co.uk/chp/)
for vista from unixutils
These applications are crafty. Thanks to developers.
You can use
Code:
(1)'tail' (from unixutils) of logfile to know ETA (2)'if exist <file-1.done> if exist <file-2.done> ... so on ... shutdown /s' to automatically turn off computer after all files have been downloaded.
Total Comments 1
Comments
-
Code:
template file name (write end to exit) :-fn2 URL:-http://download843.mediafire.com/gnyvblcgnrmg/cexz23f5t9s3t1b/Finding+Nemo+-+Sha2lba.Com_By_Sam.part2.rar 03:59 PM time to schedule job :-16:00 Added a new job with job ID = 24 file name (write end to exit) :-fn3 URL:-http://download843.mediafire.com/070j0q671ygg/avmtzv8e3t182vt/Finding+Nemo+-+Sha2lba.Com_By_Sam.part3.rar 03:59 PM time to schedule job :-16:00 Added a new job with job ID = 25 file name (write end to exit) :-fn4 URL:-http://download1334.mediafire.com/8d253gjlg1hg/3a487e6yqin7b54/Finding+Nemo+-+Sha2lba.Com_By_Sam.part4.rar 03:59 PM time to schedule job :-16:01 Cannot create a file when that file already exists. file name (write end to exit) :-end
can you spot error in template.bat ?Posted 05-17-2011 at 05:33 AM by sumeet inani