

InterviewSolution
Saved Bookmarks
1. |
Solve : Batch file needed? |
Answer» <html><body><p>Hi<br/><br/><br/> I am not familiar with batch commands. I need <a href="https://interviewquestions.tuteehub.com/tag/help-239643" style="font-weight:bold;" target="_blank" title="Click to know more about HELP">HELP</a> from you guys to create a batch file.<br/><br/>I am <a href="https://interviewquestions.tuteehub.com/tag/using-1441597" style="font-weight:bold;" target="_blank" title="Click to know more about USING">USING</a> some kind of tool that starts Building periodically every 5 mins if there are any new files or binaries placed in that folder.<br/>Now I need a batch file that recognises latest binaries and triggers the build.<br/>When the job is done, then it should inform the building tool that the binaries has been tested.<br/><br/>Thanks<br/>cnu<br/><br/><br/> Quote from: mukku on April 22, 2010, 03:48:17 AM</p><blockquote><br/>I am using some kind of tool that starts Building periodically every 5 mins if there are any new files or binaries placed in that folder.<br/><br/></blockquote> <br/>What building Tool? Post the batch file you have created.<br/><br/>The OS automatically tracks the file's name, size and creation date when a file is placed in a folder.<br/><br/>Use the dir command to display the information.<br/><br/><br/><a href="https://interviewquestions.tuteehub.com/tag/c-3540" style="font-weight:bold;" target="_blank" title="Click to know more about C">C</a>:\>dir<br/> Volume in drive C has no label.<br/> Volume Serial Number is 0652-E41D<br/><br/> Directory of C:\<br/><br/>04/16/2010 05:05 PM 1100<br/>06/10/2009 04:42 PM 24 autoexec.bat<br/>06/10/2009 04:42 PM 10 config.sys<br/>04/16/2010 08:59 PM LaserJet517<br/>04/17/2010 07:17 AM Office2003SP3Changes<br/>07/13/2009 09:37 PM PerfLogs<br/>04/24/2010 05:30 AM Program Files<br/>04/16/2010 04:19 PM Users<br/>04/23/2010 06:41 PM Windows<br/> 2 File(s) 34 bytes<br/> 7 Dir(s) 300,943,646,720 bytes free<br/><br/>C:\> Quote from: mukku on April 22, 2010, 03:48:17 AM<blockquote>Now I need a batch file that recognises latest binaries and triggers the build.<br/></blockquote> <br/><br/>C:\test>type buildlog.bat<br/> Code: <a>[Select]</a>echo off<br/><br/>if EXIST timefile*.txt del timefile*.txt<br/>dir > folderlog.txt<br/>rem for four times add dir info to log each time interval ( command line arg %1 )<br/>set /a c=0<br/>:timer<br/>if %c%==4 goto end<br/>set /a c=%c% + 1<br/>time /t > timefile%c%.txt<br/>sleep.exe %1<br/>time /t >> timefile%c%.txt<br/><br/>dir >> folderlog.txt<br/><br/>type folderlog.txt<br/>goto timer<br/>:end<br/><br/>C:\test>type timefile*.txt<br/><br/>timefile1.txt<br/><br/><br/>02:42 PM<br/>02:43 PM<br/><br/>timefile2.txt<br/><br/><br/>02:43 PM<br/>02:44 PM<br/><br/>timefile3.txt<br/><br/><br/>02:44 PM<br/>02:45 PM<br/><br/>timefile4.txt<br/><br/><br/>02:45 PM<br/>02:46 PM<br/><br/>C:\test><br/>Hi, Greg!<br/> Quote from: Salmon Trout on April 24, 2010, 02:09:04 PM<blockquote>Hi, Greg!<br/><br/></blockquote> Not again...so bill, what <a href="https://interviewquestions.tuteehub.com/tag/proxy-11644" style="font-weight:bold;" target="_blank" title="Click to know more about PROXY">PROXY</a> are you using, <a href="https://interviewquestions.tuteehub.com/tag/since-644476" style="font-weight:bold;" target="_blank" title="Click to know more about SINCE">SINCE</a> you can't use your ISP to get on?I voted... Quote from: patio on April 24, 2010, 03:16:34 PM<blockquote>I voted...<br/></blockquote> <br/>It's our duty!why is there a poll for this topic?I wanted to vote, but I had a problem. Two problems.<br/><em>There were not enough choices.<br/>The choices available were hard to discriminate</em>. Quote from: Geek-9pm on April 24, 2010, 07:05:06 PM<blockquote>The choices available were hard to discriminate[/i].<br/></blockquote> <br/>I'm not helping you find your glasses this time, Mr. Magoo.</body></html> | |