<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; cmd</title> <atom:link href="http://www.ghacks.net/tag/cmd/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 13:29:21 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Use Forfiles To Process Files Based On Age</title><link>http://www.ghacks.net/2010/08/05/use-forfiles-to-process-files-based-on-age/</link> <comments>http://www.ghacks.net/2010/08/05/use-forfiles-to-process-files-based-on-age/#comments</comments> <pubDate>Thu, 05 Aug 2010 17:30:44 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[cmd]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[forfiles]]></category> <category><![CDATA[windows tips]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=31880</guid> <description><![CDATA[It is always good to know some command line magic, as it is sometimes easier to process commands that way. This guide demonstrates the Forfiles command in Windows Vista and Windows 7. Forfiles can process files based on names, file extensions and age. It is for instance possible to find all documents in a directory [...]]]></description> <content:encoded><![CDATA[<p>It is always good to know some command line magic, as it is sometimes easier to process commands that way. This guide demonstrates the Forfiles command in Windows Vista and Windows 7. Forfiles can process files based on names, file extensions and age. It is for instance possible to find all documents in a directory that are older than 20 days, or all documents in c:\documents that have been changed since a specific date.</p><p>The forfiles command can be coupled with processing options to delete those files, or create a list of all files that match the filters. Lets take a closer look at the forfiles command.</p><p><span
id="more-31880"></span><br
/><blockquote>FORFILES [/P pathname] [/M searchmask] [/S]<br
/> [/C command] [/D [+ | -] {dd/MM/yyyy | dd}]</p><p>Description:<br
/> Selects a file (or set of files) and executes a<br
/> command on that file. This is helpful for batch jobs.</p><p>Parameter List:<br
/> /P    pathname      Indicates the path to start searching.<br
/> The default folder is the current working<br
/> directory (.).</p><p> /M    searchmask    Searches files according to a searchmask.<br
/> The default searchmask is &#8216;*&#8217; .</p><p> /S                  Instructs forfiles to recurse into<br
/> subdirectories. Like &#8220;DIR /S&#8221;.</p><p> /C    command       Indicates the command to execute for each file.<br
/> Command strings should be wrapped in double<br
/> quotes.</p><p> The default command is &#8220;cmd /c echo @file&#8221;.</p><p> The following variables can be used in the<br
/> command string:<br
/> @file    &#8211; returns the name of the file.<br
/> @fname   &#8211; returns the file name without<br
/> extension.<br
/> @ext     &#8211; returns only the extension of the<br
/> file.<br
/> @path    &#8211; returns the full path of the file.<br
/> @relpath &#8211; returns the relative path of the<br
/> file.<br
/> @isdir   &#8211; returns &#8220;TRUE&#8221; if a file type is<br
/> a directory, and &#8220;FALSE&#8221; for files.<br
/> @fsize   &#8211; returns the size of the file in<br
/> bytes.<br
/> @fdate   &#8211; returns the last modified date of the<br
/> file.<br
/> @ftime   &#8211; returns the last modified time of the<br
/> file.</p><p> To include special characters in the command<br
/> line, use the hexadecimal code for the character<br
/> in 0xHH format (ex. 0&#215;09 for tab). Internal<br
/> CMD.exe commands should be preceded with<br
/> &#8220;cmd /c&#8221;.</p><p> /D    date          Selects files with a last modified date greater<br
/> than or equal to (+), or less than or equal to<br
/> (-), the specified date using the<br
/> &#8220;dd/MM/yyyy&#8221; format; or selects files with a<br
/> last modified date greater than or equal to (+)<br
/> the current date plus &#8220;dd&#8221; days, or less than or<br
/> equal to (-) the current date minus &#8220;dd&#8221; days. A<br
/> valid &#8220;dd&#8221; number of days can be any number in<br
/> the range of 0 &#8211; 32768.<br
/> &#8220;+&#8221; is taken as default sign if not specified.</p><p> /?                  Displays this help message.</p></blockquote><p>This help file can be opened by entering the command forfiles /? in a command prompt. Press Windows-R, type cmd, and hit enter to launch the command line in Windows.</p><p>The command</p><p><code>forfiles /P c:\test\ /M .doc /S /D -10</code></p><p>searches the directory c:\test and all its subdirectories for files with the .doc extension that are older than 10 days.</p><p>The parameter /p followed by a directory defines the starting directory, /s includes subdirectories in the search, /m filters the files and folders based on the entered string, and /D defines the date or a time span.</p><p>The /C command is used to process the files that are found further. It can for instance be used to</p><p><code>/C "cmd /c echo @fname" > test.txt</code></p><p>echo the names of each file found and save the results in text.txt in the same directory.</p><p>The full command then looks like this</p><p><code>forfiles /P c:\test\ /M .doc /S /D -10 /C "cmd /c echo @fname" > test.txt</code></p><p>Another possibility is to delete the files that match the search, this is done with the command</p><p><code>/C "cmd /c del @File</code></p><p>It is however recommended to test the output first, before issuing the delete command to make sure that only the right files are deleted.</p><p>Experienced users may create a batch file to execute forfiles regularly.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/08/05/use-forfiles-to-process-files-based-on-age/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Nirsoft Command Line Tool</title><link>http://www.ghacks.net/2009/04/02/nirsoft-command-line-tool/</link> <comments>http://www.ghacks.net/2009/04/02/nirsoft-command-line-tool/#comments</comments> <pubDate>Thu, 02 Apr 2009 14:35:55 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[cmd]]></category> <category><![CDATA[command line tool]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[nircmd]]></category> <category><![CDATA[nirsoft]]></category> <category><![CDATA[portable software]]></category> <category><![CDATA[windows software]]></category> <guid
isPermaLink="false">http://www.ghacks.net/2009/04/02/nirsoft-command-line-tool/</guid> <description><![CDATA[Nircmd is a impressive command line tool considering its size of just 29 Kilobytes. It can be used to launch an incredible amount of commands from the Windows command line or by utilizing the program from a batch file. The best option would be to copy it into a system path folder so that the [...]]]></description> <content:encoded><![CDATA[<p>Nircmd is a impressive command line tool considering its size of just 29 Kilobytes. It can be used to launch an incredible amount of commands from the Windows command line or by utilizing the program from a batch file. The best option would be to copy it into a system path folder so that the command line tool could be executed from any directory.</p><p>The website of the developer contains the download <a
href="http://www.nirsoft.net/utils/nircmd.html">link</a> but also samples of the functionality of the command line tool. The basic command for the tool is <strong>nircmd command parameters</strong>. There are more than 80 commands to chose from very specific ones like changing the system volume to advanced commands that manipulate Registry entries or are execute on remote computer systems.</p><p>A practical example that shows the complexity of the command tool would be the command to turn off the computer system which can be done with <strong>nircmd.exe exitwin poweroff</strong>. An advanced version in the form of <strong>multiremote copy &#8220;c:\temp\computers.txt&#8221; exitwin poweroff force</strong> of this exists that can turn off all remote computer systems specified in the text file computers.txt</p><p><span
id="more-11610"></span>Some of the more common uses for the nircmd command line tool are writing and deleting values in the Windows Registry, writing values to ini files, connecting to a VPN network or Internet account, changing file attributes, turning off the monitor or working with remote computers.</p><p>A selection of useful commands:</p><ul><li><strong>nircmd regedit &#8220;~$clipboard$&#8221;</strong> &#8211; Will open the Registry key that has been copied to the Windows Clipboard</li><li><strong>nircmd.exe service restart [servicename]</strong> &#8211; Will restart the service specified in [servicename]. Works also with start, stop, pause and setting startup types.</li><li><strong>nircmd.exe setprocesspriority [processname] high</strong> / <strong>nircmd.exe setprocessaffinity [processname] 0 1</strong> &#8211; Change the process priority or process affinity of a selected process.</li><li><strong>nircmd.exe killprocess [processname]</strong> &#8211; Kills the specified process</li></ul><p>The help file that is supplied with the download of the command line tool is containing all commands and their possible parameters. This is a great tool especially for users who write batch files but also for those who like to work from the command line.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/04/02/nirsoft-command-line-tool/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Console 2 a better cmd.exe</title><link>http://www.ghacks.net/2008/06/09/console-2-a-better-cmdexe/</link> <comments>http://www.ghacks.net/2008/06/09/console-2-a-better-cmdexe/#comments</comments> <pubDate>Mon, 09 Jun 2008 09:01:19 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[cmd]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[console 2]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=4917</guid> <description><![CDATA[The Windows command line tool that can be accessed by typing cmd.exe in the run box has not been changed in a long time. It provides a basic functionality which mostly cannot be altered. It is for instance not possible to pick any other font than the two that can be selected. Console 2 tries [...]]]></description> <content:encoded><![CDATA[<p>The Windows command line tool that can be accessed by typing cmd.exe in the run box has not been changed in a long time. It provides a basic functionality which mostly cannot be altered. It is for instance not possible to pick any other font than the two that can be selected.</p><p><a
href="http://sourceforge.net/projects/console/">Console 2</a> tries to be a better command line in Windows by migrating the command line into the modern age. It introduces tabbed browsing, transparency, layout changes and several other functions that increase productivity. Most of the new features can be configured in the settings of Console 2.</p><p>Tabbed browsing on the other hand is available from the main toolbar. The settings are divided into several categories like tabs, appearance and behavior. A new font &#8211; including font size, format, color and smoothing &#8211; can be defined in the appearance menu together with transparency settings and features like snapping to desktop edges when the window is moved.</p><p><span
id="more-4917"></span><img
src="http://www.ghacks.net/wp-content/uploads/2008/06/console2-500x400.jpg" alt="console2" title="console2" width="500" height="400" class="alignnone size-medium wp-image-4918" /></p><p>The functionality of Console 2 is exactly the same that the default Windows command line offers which means that the changes are mostly cosmetic changes that do increase productivity. The most important additions in my opinion are the selection of additional fonts, the transparency and the tabbed browsing.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2008/06/09/console-2-a-better-cmdexe/feed/</wfw:commentRss> <slash:comments>16</slash:comments> </item> <item><title>YubNub a social internet command line</title><link>http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/</link> <comments>http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/#comments</comments> <pubDate>Tue, 16 Jan 2007 17:28:08 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[The Web]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[cmd]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[internet]]></category> <category><![CDATA[ls]]></category> <category><![CDATA[social-command-line]]></category> <category><![CDATA[yubnub]]></category> <guid
isPermaLink="false">http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/</guid> <description><![CDATA[The first time I saw the yubnub website I was thinking that no one would need this website at all but after some testing it became clear that it offers an easy way to access many services very fast without depending on bookmarks or links. If you do work with the command line in Windows or Linux you feel right at home, you enter a command and some parameters and yubnub does the rest.]]></description> <content:encoded><![CDATA[<p>The first time I saw the <a
target="_blank" title="yubnub" href="http://yubnub.org/">yubnub</a> website I was thinking that no one would need this website at all but after some testing it became clear that it offers an easy way to access many services very fast without depending on bookmarks or links. If you do work with the command line in Windows or Linux you feel right at home, you enter a command and some parameters and yubnub does the rest.</p><p>A <a
target="_blank" title="yubnub commands" href="http://yubnub.org/kernel/ls?args=">list of commands</a> is accessible by entering ls into the form field. I think an example will illustrate the strength of yubnub; wp ghacks searches wikipedia for the term ghacks, gim ghacks searches google images for ghacks. y or g searches yahoo or google for a selected search term. That is not all of course. AM title searches amazon for the title that you enter, random 1000 returns a random number between 1 and 1000.</p><p><span
id="more-1107"></span>A good selection of commands that should be useful for most users are Jeremy&#8217;s Picks which displays a list of about 100 commands. It is possible to create your own commands. You do select a command string that is not used yet and select a url that uses variables to perform searches or operations. One example would be <span
class="hint"> <a
title="Linkification: http://images.google.com/images?q=%s" class="linkification-ext" href="http://images.google.com/images?q=%s">http://images.google.com/images?q=%s</a> which is simply the search string for google images. </span></p><p><span
class="hint">The search string that is entered is substituted with %s in this example. It is possible to create more advanced searches  with more than one parameters.</span></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
