

InterviewSolution
Saved Bookmarks
1. |
Solve : Identify file date? |
Answer» <html><body><p>Assume the following: location-1 creates a database update file and creates a zip file. Location-2 receives the zip file and will download it only if they do not already have that file. I would like to modify the download batch file to at least identify the date/time of the file and display in on screen with a <a href="https://interviewquestions.tuteehub.com/tag/message-25597" style="font-weight:bold;" target="_blank" title="Click to know more about MESSAGE">MESSAGE</a> that says 'this file was created on ____ at ____. If you have this update already, press <a href="https://interviewquestions.tuteehub.com/tag/esc-446582" style="font-weight:bold;" target="_blank" title="Click to know more about ESC">ESC</a> to abort.<br/><br/>So, my question is how to have the batch file look at the zip file, get the date/time, and display it on screen.<br/><br/>Later on we may want to automate this by having the batch file check the zip file against what is already on location-2 computer and abort or download - but for for now, I'm just interested in <a href="https://interviewquestions.tuteehub.com/tag/displaying-2059353" style="font-weight:bold;" target="_blank" title="Click to know more about DISPLAYING">DISPLAYING</a> the date/time.<br/>thanks,C:\<a href="https://interviewquestions.tuteehub.com/tag/test-13460" style="font-weight:bold;" target="_blank" title="Click to know more about TEST">TEST</a>>type doni.bat<br/>echo off<br/><br/>dir /tc %1 | <a href="https://interviewquestions.tuteehub.com/tag/findstr" style="font-weight:bold;" target="_blank" title="Click to know more about FINDSTR">FINDSTR</a> %1<br/><br/>Output:<br/><br/>C:\test>doni.bat zee.bat<br/>05/30/2010 06:52 PM 87 zee.bat<br/><br/>C:\test></p></body></html> | |