{"id":312,"date":"2008-09-09T09:38:51","date_gmt":"2008-09-09T14:38:51","guid":{"rendered":"https:\/\/blogs.mathworks.com\/videos\/2008\/09\/09\/advanced-matlab-file-name-processing-from-directory-listing\/"},"modified":"2016-04-04T15:24:35","modified_gmt":"2016-04-04T20:24:35","slug":"advanced-matlab-file-name-processing-from-directory-listing","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/videos\/2008\/09\/09\/advanced-matlab-file-name-processing-from-directory-listing\/","title":{"rendered":"Advanced MATLAB: File name processing from directory listing"},"content":{"rendered":"Very often MATLAB users want to be able to process a set of files from a directory. In this video, I show how you can look through a directory seeking files of the form &#8220;data###.dat&#8221; and then returning the &#8220;###&#8221; as a number with any leading zeros removed. This makes use of regular expressions, but does not explain their theory much at all.\r\n<div><div class=\"row\"><div class=\"col-xs-12 containing-block\"><div class=\"bc-outer-container add_margin_20\"><videoplayer><div class=\"video-js-container\"><video data-video-id=\"3755680596001\" data-video-category=\"blog\" data-autostart=\"false\" data-account=\"62009828001\" data-omniture-account=\"mathwgbl\" data-player=\"rJ9XCz2Sx\" data-embed=\"default\" id=\"mathworks-brightcove-player\" class=\"video-js\" controls><\/video><script src=\"\/\/players.brightcove.net\/62009828001\/rJ9XCz2Sx_default\/index.min.js\"><\/script><script>if (typeof(playerLoaded) === 'undefined') {var playerLoaded = false;}(function isVideojsDefined() {if (typeof(videojs) !== 'undefined') {videojs(\"mathworks-brightcove-player\").on('loadedmetadata', function() {playerLoaded = true;});} else {setTimeout(isVideojsDefined, 10);}})();<\/script><\/div><\/videoplayer><\/div><\/div><\/div><\/div>\r\n&nbsp;\r\n\r\nThis is not the first time this kind of thing has been discussed. Check out <a href=\"https:\/\/blogs.mathworks.com\/loren\/2006\/08\/02\/processing-a-set-of-files\/\">Loren&#8217;s take<\/a>, or <a href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/06\/06\/batch-processing\/\">Steve&#8217;s take<\/a> from their blogs.","protected":false},"excerpt":{"rendered":"<div class=\"thumbnail thumbnail_asset asset_overlay video\"><a href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/09\/09\/advanced-matlab-file-name-processing-from-directory-listing\/?dir=autoplay\"><img decoding=\"async\" src=\"https:\/\/cf-images.us-east-1.prod.boltdns.net\/v1\/static\/62009828001\/850ddd1e-60d7-43b1-85db-4ab51e3f87cb\/d5a3c6d5-9240-4d7a-b49d-b64b601a074d\/1280x720\/match\/image.jpg\" onError=\"this.style.display ='none';\"\/>\n      <div class=\"overlay_container\">\n      <span class=\"icon-video icon_color_null\"><time class=\"video_length\">5:54<\/time><\/span>\n      <\/div>\n      <\/a><\/div><p>Very often MATLAB users want to be able to process a set of files from a directory. In this video, I show how you can look through a directory seeking files of the form &#8220;data###.dat&#8221; and&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/videos\/2008\/09\/09\/advanced-matlab-file-name-processing-from-directory-listing\/\">read more >><\/a><\/p>","protected":false},"author":68,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[19,4,12],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/312"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/comments?post=312"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/312\/revisions"}],"predecessor-version":[{"id":2154,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/posts\/312\/revisions\/2154"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/media?parent=312"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/categories?post=312"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/videos\/wp-json\/wp\/v2\/tags?post=312"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}