{"id":2333,"date":"2008-10-17T09:06:42","date_gmt":"2008-10-17T14:06:42","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2008\/10\/17\/faster-easier-file-finding\/"},"modified":"2016-05-17T15:09:43","modified_gmt":"2016-05-17T19:09:43","slug":"faster-easier-file-finding","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2008\/10\/17\/faster-easier-file-finding\/","title":{"rendered":"Faster, easier file finding"},"content":{"rendered":"<div class=\"content\">\r\n\r\nSo you <i>kind of<\/i> remember what you named that file, but you don't remember exactly where you put it. Sound familiar? You have some options\r\nfor finding that file. It's likely that your OS has a file-finding utility that supports wildcard searching, though limiting\r\nyour search to your MATLAB path might not be trivially easy. Or you can use MATLAB's <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2008b\/techdoc\/matlab_env\/f10-14803.html#f10-7498\">Find Files tool.<\/a> But Brett's Pick this week provides an approach that is sure to become a favorite. With <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=1266&amp;objectType=file (link no longer works)\">WWHICH<\/a> (\"Wild Which\"), by fellow MathWorker Lucio Andrade-Cetto, wildcard searching is fast and easy.\r\n\r\nLet's say, for instance, that I remember writing a file to expand or contract axes when I click on them. I know that the file\r\nhad \"expand\" in its name, but then my memory fails me. (Maybe I'm just getting old.) Look how easy (and fast!) finding that\r\nfile can be:\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/pick\/..\/images\/pick\/wwhich_img.jpg\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nAnd there it is...\"expandAxes,\" with an example!\r\n\r\nBack in July, I <a href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/07\/25\/whats\/\">blogged<\/a> about a user-contributed utility called <a title=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=20615&amp;objectType=FILE (link no longer works)\">WHATS<\/a> that expands MATLAB's WHAT function to include hyperlinks. Today's Pick provides another tweak to improve your MATLAB experience!\r\n\r\nTell us <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2333#respond\">here<\/a> about your own utilities for customizing the way you work in MATLAB. Or better yet, post your utilities to the File Exchange!\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_f20edaa3fd2a4cbda757fc30e6fddbca() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='f20edaa3fd2a4cbda757fc30e6fddbca ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' f20edaa3fd2a4cbda757fc30e6fddbca';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Brett Shoelson';\r\n        copyright = 'Copyright 2008 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae 7.6<\/p>\r\n\r\n<\/div>\r\n<!--\r\nf20edaa3fd2a4cbda757fc30e6fddbca ##### SOURCE BEGIN #####\r\n%% Faster, easier file finding\r\n%%\r\n% So you _kind of_ remember what you named that file, but you don't remember exactly where you put it. Sound familiar? You have some options for finding that file. It's likely that your OS has a file-finding utility that supports wildcard searching, though limiting your search to your MATLAB path might not be trivially easy. Or you can use MATLAB's <https:\/\/www.mathworks.com\/help\/releases\/R2008b\/techdoc\/matlab_env\/f10-14803.html#f10-7498 Find Files tool.> But <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectType=author&objectId=1093599 Brett>'s Pick this week provides an approach that is sure to become a favorite. With <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=1266&objectType=file WWHICH> (\"Wild Which\"), by fellow MathWorker <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadAuthor.do?objectId=1094494&objectType=author Lucio Andrade-Cetto>, wildcard searching is fast and easy.\r\n%%\r\n% Let's say, for instance, that I remember writing a file to expand or contract axes when I click on them. I know that the file had \"expand\" in its name, but then my memory fails me. (Maybe I'm just getting old.) Look how easy (and fast!) finding that file can be:\r\n%%\r\n%\r\n%<<https:\/\/blogs.mathworks.com\/pick\/..\/images\/pick\/wwhich_img.jpg>>\r\n%\r\n%%\r\n% And there it is...\"expandAxes,\" with an example!\r\n\r\n%%\r\n% Back in July, I <https:\/\/blogs.mathworks.com\/pick\/2008\/07\/25\/whats\/ blogged> about a user-contributed utility called <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/loadFile.do?objectId=20615&objectType=FILE WHATS> that expands MATLAB's WHAT function to include hyperlinks. Today's Pick provides another tweak to improve your MATLAB experience!\r\n\r\n%%\r\n% Tell us <https:\/\/blogs.mathworks.com\/pick\/?p=2333#respond here> about your own utilities for customizing the way you work in MATLAB. Or better yet, post your utilities to the File Exchange!\r\n##### SOURCE END ##### f20edaa3fd2a4cbda757fc30e6fddbca\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nSo you kind of remember what you named that file, but you don't remember exactly where you put it. Sound familiar? You have some options\r\nfor finding that file. It's likely that your OS has a... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2008\/10\/17\/faster-easier-file-finding\/\">read more >><\/a><\/p>","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2333"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2333"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2333\/revisions"}],"predecessor-version":[{"id":7242,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2333\/revisions\/7242"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2333"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2333"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2333"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}