{"id":166,"date":"2008-04-07T11:50:18","date_gmt":"2008-04-07T06:20:18","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/clear-recent-documents-history-in-a-single-click-in-windows-xp-and-vista\/"},"modified":"2021-06-09T22:42:09","modified_gmt":"2021-06-09T17:12:09","slug":"clear-recent-files-history-in-a-single-click-in-windows","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/clear-recent-files-history-in-a-single-click-in-windows\/","title":{"rendered":"Clear Recent Files history Using Script in Windows 10"},"content":{"rendered":"<p>Did you notice that in Windows it takes exactly half a dozen mouse clicks to clear the recent items history? This post has a VBScript to clear the recent documents history in a single click in Windows 10 and earlier.<\/p>\n<h2>Clear Recent Files history in Windows<\/h2>\n<p>In Windows 10, here is the procedure to clear the recent files history which appears in <a href=\"https:\/\/www.winhelponline.com\/blog\/remove-quick-access-other-shell-folders-file-explorer\/\">Quick access<\/a> home view:<\/p>\n<ol>\n<li>Open File Explorer to Quick access<\/li>\n<li>Right-click Quick access icon and click <strong>Options<\/strong><\/li>\n<li>To clear recent files history, uncheck <strong>Show recently used files in Quick access<\/strong><\/li>\n<li>Click Apply<\/li>\n<li>Re-enable <strong>Show recently used files in Quick access<\/strong><\/li>\n<li>click OK<\/li>\n<\/ol>\n<p><em><strong>Note:<\/strong> In Step 3 above, you can also click on the <strong>Clear<\/strong> button shown in that dialog. But, it also clears the <strong>Frequent folders<\/strong> list in Quick access.<\/em><\/p>\n<hr \/>\n<h3>Clear recent files history using VBScript<\/h3>\n<p>Pick one of the following VBScripts below to clear the recent files history on your Windows 10 computer. The script works in any version of Windows, though.<\/p>\n<ol>\n<li>Copy any one of the following script codes to Notepad.<strong>Script 1<\/strong>\n<pre>Const sRecent = 8\r\nSet objShell = CreateObject(\"Shell.Application\")\r\nSet objFolder = objShell.Namespace(sRecent)\r\niClr = 0\r\nSet objFolderItem = objFolder.Self\r\nFor Each objVerb In objFolderItem.Verbs\r\n\tIf InStr(LCase(objVerb.Name), \"c&amp;lear recent items list\") Then\r\n\t\tobjVerb.DoIt\r\n\t\tiClr = 1\r\n\t\tExit For\r\n\tEnd If\r\nNext\r\nIf iClr = 0 Then MsgBox \"Could not clear Recent items.\"<\/pre>\n<p><strong>Script 2 (alternate method)<\/strong><\/p>\n<pre id=\"code\">Set WshShell = WScript.CreateObject(\"WScript.Shell\")\r\nSet objFSO = CreateObject(\"Scripting.FileSystemObject\")\r\nsRD = WshShell.SpecialFolders(\"Recent\")\r\nif sRD &lt;&gt; \"\" then\r\n\u00a0\u00a0\u00a0 On Error Resume Next\r\n\u00a0\u00a0\u00a0 objFSO.DeleteFile(sRD &amp; \"\\*.lnk\")\r\n\u00a0\u00a0\u00a0 objFSO.DeleteFile(sRD &amp; \"\\*.url\")\r\nend if<\/pre>\n<\/li>\n<li>Save the file with .vbs extension &#8212; e.g., <code>clear_recent_files_history.vbs<\/code><\/li>\n<li>Double-click the script file to clear recent files history.<\/li>\n<\/ol>\n<p>Note that you can pin the shortcut to the script to the Start or Taskbar, and customize the shortcut icon if you&#8217;re bored of seeing the default Windows Script icon.<\/p>\n<p>The above scripts work in any version of Windows, including Windows 10. But, if you&#8217;re using Windows 7, there is no need for such a script, because you can do it directly via Start \u2192 right-click Recent Items \u2192 click <strong>Clear Recent Items List<\/strong>.<\/p>\n<h3>Clear Quick access Frequent folders and Recent files history<\/h3>\n<p>To clear the Quick access frequent folders and recent files history, open the Folder Options dialog and click the <strong>Clear<\/strong> button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/w10-quickaccess-3.png\" alt=\"clear quick access history\" width=\"329\" height=\"94\" \/><\/p>\n<p>The pinned items in the Quick access won&#8217;t be removed.<\/p>\n<p>To automate the above, you can use the following AutoHotKey script\/macro:<\/p>\n<h4>AutoHotKey script to clear Quick access history<\/h4>\n<pre>Run, control.exe folders\r\nWinWait, ahk_class #32770\r\nWinActivate, ahk_class #32770\r\nWinWaitActive, ahk_class #32770\r\nSend, !c {Esc}<\/pre>\n<p>Install <a href=\"https:\/\/www.autohotkey.com\/\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">AutoHotKey<\/a> on your computer. Then, using Notepad, create a script file with the above contents. Save the file as <code>clear_quick_access_history.ahk<\/code> and double-click the file to run it. The script launches Folder Options, clicks the Clear button automatically and closes Folder Options.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you notice that in Windows it takes exactly half a dozen mouse clicks to clear the recent items history? This post has a VBScript to clear the recent documents history in a single click in Windows 10 and earlier. Clear Recent Files history in Windows In Windows 10, here is the procedure to clear &#8230; <a title=\"Clear Recent Files history Using Script in Windows 10\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/clear-recent-files-history-in-a-single-click-in-windows\/\" aria-label=\"Read more about Clear Recent Files history Using Script in Windows 10\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[762,480],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-windows","tag-autohotkey","tag-scripts"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1676,"url":"https:\/\/www.winhelponline.com\/blog\/quick-access-frequent-recent-ungrouped\/","url_meta":{"origin":166,"position":0},"title":"Quick Access\/Home View Incorrect &#8211; Frequent Folders &#038; Recent Files Are Grouped Together","author":"Ramesh","date":"February 23, 2016","format":false,"excerpt":"By default, the Frequent Folders and Recent Files are grouped separately in the Quick Access (now known as \"Home\") folder. Occasionally, on some systems, the Quick access view may appear incorrectly (e.g., the Frequent Folders and Recent Files items get mixed up and show under a single category) due to\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"quick access \"home\" view incorrect - grouped together","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/quick-access-home-view-incorrect.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/quick-access-home-view-incorrect.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/quick-access-home-view-incorrect.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/quick-access-home-view-incorrect.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1561,"url":"https:\/\/www.winhelponline.com\/blog\/quick-access-home-stuck-pinned-items-reset\/","url_meta":{"origin":166,"position":1},"title":"[Fix] Quick Access Pinned Shortcuts Stuck or Not Working","author":"Ramesh","date":"February 3, 2016","format":false,"excerpt":"Quick access (Home) in Windows 10 and 11 provides a convenient way to access folders you frequently use by pinning them. However, in some situations, the pinned shortcuts in Quick access get stuck, and you cannot remove or unpin them. Quick access sometimes loses track of a target folder if\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/remove-stuck-pin-quick-access.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/remove-stuck-pin-quick-access.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/remove-stuck-pin-quick-access.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/remove-stuck-pin-quick-access.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1664,"url":"https:\/\/www.winhelponline.com\/blog\/show-recently-used-files-in-quick-access-unchecked-automatically\/","url_meta":{"origin":166,"position":2},"title":"&#8220;Show recently used files in Quick Access&#8221; Disables Automatically in Windows 10\/11","author":"Ramesh","date":"February 20, 2016","format":false,"excerpt":"If the \"Show recently used files in Quick Access\" option in Windows 10\/11 is automatically unchecked in Folder Options, this is caused by a Personalize setting. Resolution Launch Settings \u2192 Personalize \u2192 Start. Enable the following option in Windows 10: Show recently opened items in Jump Lists on Start or\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"show recent files jumplists in quick access and explorer","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/show-recent-files-personalize-w11.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/show-recent-files-personalize-w11.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/show-recent-files-personalize-w11.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/02\/show-recent-files-personalize-w11.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":71178,"url":"https:\/\/www.winhelponline.com\/blog\/nothing-happens-pin-to-quick-access-home\/","url_meta":{"origin":166,"position":3},"title":"Nothing Happens when you click &#8220;Pin to Quick access&#8221;","author":"Ramesh","date":"January 27, 2024","format":false,"excerpt":"When you right-click on a shell folder like Desktop, Documents, Pictures, Music, or Videos and click \"Pin to Quick access\", nothing may happen. Also, the item is not pinned when you drag the shell folder and drop it in the Quick Access (Home) area. Sometimes, you may get the following\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"quick access pin - path already exists","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/01\/quick-access-path-already-exists.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/01\/quick-access-path-already-exists.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/01\/quick-access-path-already-exists.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":254,"url":"https:\/\/www.winhelponline.com\/blog\/file-explorer-slow-working-green-progress-bar-foldertype\/","url_meta":{"origin":166,"position":4},"title":"File Explorer &#8220;Working on it&#8221; Showing Green Progress Bar","author":"Ramesh","date":"April 30, 2008","format":false,"excerpt":"Summary: Windows 10's File Explorer stalls saying \"Working on it...\" during the folder type automatic discovery process. And in earlier versions of Windows, Windows may sometimes assign incorrect template for folders if the content discovery or sniffing goes wrong or the folder view settings in the registry are messed up.\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"File Explorer Working on it","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/ftype2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/ftype2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/ftype2.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":27399,"url":"https:\/\/www.winhelponline.com\/blog\/clear-ms-paint-recent-files-mru-windows-11-10\/","url_meta":{"origin":166,"position":5},"title":"Clear MS Paint Recent Files History in Windows 11\/10","author":"Ramesh","date":"August 21, 2022","format":false,"excerpt":"The MS Paint app maintains a list of the most recently opened files. The list, shown when you click on the File menu, contains the last nine files you opened. This article tells you how to clear the Paint MRU history in Windows 10 and Windows 11. Clear Paint MRU\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"clear mspaint recent history windows 10\/11 - hive","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/08\/mspaint-recent-mru-w11.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/08\/mspaint-recent-mru-w11.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/08\/mspaint-recent-mru-w11.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/08\/mspaint-recent-mru-w11.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}