

InterviewSolution
Saved Bookmarks
1. |
Solve : HELP Batch File? |
Answer» <html><body><p>Hello everybody,<br/>I need your help with a batch file for my stage.<br/>What im tryng do is the next:<br/>____________________________________<br/>if date/t equal 29-06-<a href="https://interviewquestions.tuteehub.com/tag/2010-290294" style="font-weight:bold;" target="_blank" title="Click to know more about 2010">2010</a><br/>execute a command (example md "folder")<br/>if not exit<br/>____________________________________<br/><br/>I need this in .bat file, help me.<br/><br/>Thank you for all.if /i %date%==Tue 06/29/2010 md folder<br/>exit Quote from: mat123 on June 28, 2010, 06:21:16 PM</p><blockquote>if /i %date%==Tue 06/29/2010 md folder<br/>exit<br/></blockquote> First off, that won't work, guaranteed. Improper syntax. Secondly, tendencia, we need to know what is printed <a href="https://interviewquestions.tuteehub.com/tag/exactly-977868" style="font-weight:bold;" target="_blank" title="Click to know more about EXACTLY">EXACTLY</a> on the <a href="https://interviewquestions.tuteehub.com/tag/screen-25632" style="font-weight:bold;" target="_blank" title="Click to know more about SCREEN">SCREEN</a> when you run echo %date% at the command prompt (cmd.exe). Quote from: tendencia on June 28, 2010, 06:17:37 PM<blockquote><br/>if date/t equal 29-06-2010<br/>execute a command (example md "folder")<br/>if not exit<br/><br/></blockquote> <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>:\test>type tend.bat<br/> Code: <a>[Select]</a>echo off<br/><br/>if "%date%"=="Mon 06/28/2010" echo folder<br/>if "%date%"=="Mon 06/28/2010" md folder<br/>date /t<br/>rem Mon 06/28/2010<br/><br/><a href="https://interviewquestions.tuteehub.com/tag/dir-431995" style="font-weight:bold;" target="_blank" title="Click to know more about DIR">DIR</a> folder<br/><strong>Output:</strong><br/><br/>C:\test>tend.bat<br/>folder<br/>Mon 06/28/2010<br/> Directory of C:\test\folder<br/><br/>06/28/2010 07:55 PM .<br/>06/28/2010 07:55 PM ..<br/> 0 File(s) 0 bytes<br/> 2 Dir(s) 294,527,905,792 bytes free<br/><br/>C:\test></body></html> | |