{"id":295,"date":"2007-03-01T09:08:43","date_gmt":"2007-03-01T14:08:43","guid":{"rendered":"http:\/\/192.168.33.66\/wp\/?p=295"},"modified":"2007-03-01T09:08:43","modified_gmt":"2007-03-01T14:08:43","slug":"command-prompt-time","status":"publish","type":"post","link":"http:\/\/www.wildow.com\/blog\/?p=295","title":{"rendered":"command prompt time"},"content":{"rendered":"<p>========================================================================<br \/>\nSPONSOR: Fast and Easy Backup Software for Windows Servers ========================================================================<br \/>\nLooking for backup software that is easy to use, fast and affordable?<br \/>\nTry Backup for Workgroups. Supports Exchange Server, Active Directory, MS-SQL, Open Files, 256-bit encryption. Stores backup data to disk-based devices. Built in mirroring. Color coded emails show you backup results.<\/p>\n<p>Download 30-day trial at: <br \/>\nhttp:\/\/info.101com.com\/default.aspx?id=35787<br \/>\n========================================================================<\/p>\n<p>I&#8217;ve modified my prompts, both in CMD and PowerShell so that they always display the current time and date. The time and date display isn&#8217;t a clock, per se. The time is updated every time I press Enter. <br \/>\nIt looks like this:<\/p>\n<p>[Wed 01\/17\/2007 21:11:02.12] C:\\><\/p>\n<p>To modify my prompt in the CMD shell, I simply use the command:<\/p>\n<p>set prompt=[$D $T] $P$G<\/p>\n<p>The $D attribute displays the date, $T the time, $P the current directory and $G the right angle bracket. I enclosed the date and time in square brackets purely for cosmetic purposes.<\/p>\n<p>Since I don&#8217;t want to enter this command every time I open a command shell (plus, I have some shell customizations such as my DOSKEY macros), I&#8217;ve created a batch file that includes the prompt command. <br \/>\nI then entered the path to the batch file in the AutoRun key under:<\/p>\n<p>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Command Processor<\/p>\n<p>If you don&#8217;t have the key, you can create it. It is type REG_SZ.<\/p>\n<p>Now, all my CMD shells show me the current date and time and all I have to do is look straight ahead and keep working.<\/p>\n<p>Next week, I&#8217;ll show you how to handle this with PowerShell.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>======================================================================== SPONSOR: Fast and Easy Backup Software for Windows Servers ======================================================================== Looking for backup software that is easy to use, fast and affordable? Try Backup for Workgroups. Supports Exchange Server, Active Directory, MS-SQL, Open Files, 256-bit encryption. Stores backup data &#8230; <a class=\"more-link\" href=\"http:\/\/www.wildow.com\/blog\/?p=295\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=295"}],"version-history":[{"count":0,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/295\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wildow.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}