{"id":5702,"date":"2017-02-22T23:06:08","date_gmt":"2017-02-22T23:06:08","guid":{"rendered":"https:\/\/wordherd.io\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/"},"modified":"2017-02-22T23:06:08","modified_gmt":"2017-02-22T23:06:08","slug":"how-to-use-vba-and-excel-to-organize-your-files-and-folders","status":"publish","type":"post","link":"https:\/\/wordherd.io\/es\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/","title":{"rendered":"How To Use VBA And Excel To Organize Your Files And Folders"},"content":{"rendered":"<p>If the group of recordsdata in your laptop will not be your robust level, you are not alone.<br \/>\n<br \/>Most of us save the whole lot in a single or two folders however because the variety of recordsdata develop, why not utilise the facility of Excel and VBA to prepare your recordsdata a bit higher.<\/p>\n<p><strong>Utilizing The File System Object To Record Folder Information In Excel<\/strong><\/p>\n<p>A typical situation is likely to be pictures you&#8217;ve gotten saved in your laptop. We&#8217;ll assume the recordsdata are saved within the one folder and you would like to prepare your pictures into completely different folders, maybe primarily based on the 12 months the picture was first saved in your laptop. The File System Object (FSO) can checklist the contents of a folder with just a few strains of VBA code.<\/p>\n<p>First, outline the FSO and the required folder. We&#8217;ll assume all the photographs are in a folder referred to as &#8220;recordsdata&#8221; which is instantly below the folder of the Excel file you are working with.<\/p>\n<p><pre>Dim fso As Scripting.FileSystemObject\n<br>Dim fld As Scripting.Folder\n<br>Dim f\n<br>Set fso = New Scripting.FileSystemObject\n<br>Set fld = fso.GetFolder(ActiveWorkbook.Path & \"recordsdata\")<\/pre>\n<\/p>\n<p>As a result of VBA can determine the date when the file was first created, the code can extract the 12 months which can be utilized as a folder title.<\/p>\n<p><pre>Worksheets(\"instance\").Activate\n<br>Vary(\"a1\").Activate\n<br>For Every f In fld.Information\n<br>yr = Yr(f.DateCreated)<\/p><p>With ActiveCell\n<br>.Offset(1, zero).Activate\n<br>.Worth = f.Title\n<br>.Offset(zero, 1) = CStr(yr)\n<br>Finish With\n<br>Subsequent<\/pre>\n<\/p>\n<p>The output of the code may look one thing like this in your worksheet<\/p>\n<p><pre>photo1.jpg,2010\n<br>photo2.jpg,2008\n<br>photo3.jpg,2007<\/pre>\n<\/p>\n<p>The following factor to do is loop by means of the itemizing, create a brand new folder primarily based on the 12 months and replica the picture to the brand new location.<\/p>\n<p><pre>vary(\"a1\").activate\n<br>set rng=activeCell.currentRegion\n<br>For Every f In rng.Rows\n<br>fromPath = ActiveWorkbook.Path & \"recordsdata\" & f.Columns(1)\n<br>toPath = ActiveWorkbook.Path & \"\" & f.Columns(2) & \"\"<\/pre>\n<\/p>\n<p>If the folder has already been created, we copy the brand new picture to that location; if it&#8217;s a new &#8220;12 months&#8221; then we create a brand new folder.<\/p>\n<p><pre>If Not fso.FolderExists(toPath) Then\n<br>fso.CreateFolder toPath\n<br>Finish If\n<br>fso.CopyFile Supply:=fromPath, Vacation spot:=toPath\n<br>Subsequent<\/pre>\n<\/p>\n<p>On this instance the code copies recordsdata primarily based on the 12 months of file creation, however may simply be tailored to make use of the month or different date-specific variables. Alternatively, classifications which might be handled as new folder names could possibly be added manually into the spreadsheet earlier than the copying course of.<\/p>\n<p><strong>Abstract<\/strong><br \/>\n<br \/>Excel has many options which enhance your productiveness. This code snippet has proven how you should use VBA in a singular method to work together with the file system and folder organisation.<\/p>\n<div class=\"source\"><a href=\"http:\/\/ezinearticles.com\/?How-To-Use-VBA-And-Excel-To-Organize-Your-Files-And-Folders&#038;id=7458498\">Fuente<\/a> por <a href=\"http:\/\/ezinearticles.com\/expert\/Andy_L_Gibson\/1382722\">Andy L Gibson<\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>If the group of recordsdata in your laptop will not be your robust level, you are not alone. Most of us save the whole lot in a single or two folders however because the variety of recordsdata develop, why not utilise the facility of Excel and VBA to prepare your recordsdata a bit higher. Utilizing [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"categories":[15],"tags":[200,595],"builders":[],"industry":[],"platform":[],"class_list":["post-5702","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-wordpress","tag-wordpress-tutorial"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How To Use VBA And Excel To Organize Your Files And Folders - WordHerd WordPress Migration<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wordherd.io\/es\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Use VBA And Excel To Organize Your Files And Folders - WordHerd WordPress Migration\" \/>\n<meta property=\"og:description\" content=\"If the group of recordsdata in your laptop will not be your robust level, you are not alone. Most of us save the whole lot in a single or two folders however because the variety of recordsdata develop, why not utilise the facility of Excel and VBA to prepare your recordsdata a bit higher. Utilizing [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wordherd.io\/es\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/\" \/>\n<meta property=\"og:site_name\" content=\"WordHerd WordPress Migration\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/wordherdio\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-02-22T23:06:08+00:00\" \/>\n<meta name=\"author\" content=\"WordHerd\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wordherdio\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"WordHerd\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/\"},\"author\":{\"name\":\"WordHerd\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/person\\\/373419b97c0fbc45a3a16462bdba0fac\"},\"headline\":\"How To Use VBA And Excel To Organize Your Files And Folders\",\"datePublished\":\"2017-02-22T23:06:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/\"},\"wordCount\":380,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\"},\"keywords\":[\"WordPress\",\"wordpress tutorial\"],\"articleSection\":[\"WordPress\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/\",\"url\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/\",\"name\":\"How To Use VBA And Excel To Organize Your Files And Folders - WordHerd WordPress Migration\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#website\"},\"datePublished\":\"2017-02-22T23:06:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/blog\\\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wordherd.io\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Use VBA And Excel To Organize Your Files And Folders\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#website\",\"url\":\"https:\\\/\\\/wordherd.io\\\/\",\"name\":\"WordHerd WordPress Migration\",\"description\":\"Website Migration Services\",\"publisher\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wordherd.io\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#organization\",\"name\":\"WordHerd WordPress Migration\",\"url\":\"https:\\\/\\\/wordherd.io\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/wordherd-trademark.png\",\"contentUrl\":\"https:\\\/\\\/wordherd.io\\\/wp-content\\\/uploads\\\/wordherd-trademark.png\",\"width\":1000,\"height\":315,\"caption\":\"WordHerd WordPress Migration\"},\"image\":{\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wordherd.io\\\/#\\\/schema\\\/person\\\/373419b97c0fbc45a3a16462bdba0fac\",\"name\":\"WordHerd\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g\",\"caption\":\"WordHerd\"},\"sameAs\":[\"https:\\\/\\\/wordherd.io\",\"https:\\\/\\\/www.facebook.com\\\/wordherdio\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wordherd\",\"https:\\\/\\\/x.com\\\/wordherdio\"],\"url\":\"https:\\\/\\\/wordherd.io\\\/es\\\/blog\\\/author\\\/wordherd\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Use VBA And Excel To Organize Your Files And Folders - WordHerd WordPress Migration","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wordherd.io\/es\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/","og_locale":"es_ES","og_type":"article","og_title":"How To Use VBA And Excel To Organize Your Files And Folders - WordHerd WordPress Migration","og_description":"If the group of recordsdata in your laptop will not be your robust level, you are not alone. Most of us save the whole lot in a single or two folders however because the variety of recordsdata develop, why not utilise the facility of Excel and VBA to prepare your recordsdata a bit higher. Utilizing [&hellip;]","og_url":"https:\/\/wordherd.io\/es\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/","og_site_name":"WordHerd WordPress Migration","article_author":"https:\/\/www.facebook.com\/wordherdio\/","article_published_time":"2017-02-22T23:06:08+00:00","author":"WordHerd","twitter_card":"summary_large_image","twitter_creator":"@wordherdio","twitter_misc":{"Escrito por":"WordHerd","Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/#article","isPartOf":{"@id":"https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/"},"author":{"name":"WordHerd","@id":"https:\/\/wordherd.io\/#\/schema\/person\/373419b97c0fbc45a3a16462bdba0fac"},"headline":"How To Use VBA And Excel To Organize Your Files And Folders","datePublished":"2017-02-22T23:06:08+00:00","mainEntityOfPage":{"@id":"https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/"},"wordCount":380,"commentCount":0,"publisher":{"@id":"https:\/\/wordherd.io\/#organization"},"keywords":["WordPress","wordpress tutorial"],"articleSection":["WordPress"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/","url":"https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/","name":"How To Use VBA And Excel To Organize Your Files And Folders - WordHerd WordPress Migration","isPartOf":{"@id":"https:\/\/wordherd.io\/#website"},"datePublished":"2017-02-22T23:06:08+00:00","breadcrumb":{"@id":"https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wordherd.io\/blog\/how-to-use-vba-and-excel-to-organize-your-files-and-folders\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wordherd.io\/"},{"@type":"ListItem","position":2,"name":"How To Use VBA And Excel To Organize Your Files And Folders"}]},{"@type":"WebSite","@id":"https:\/\/wordherd.io\/#website","url":"https:\/\/wordherd.io\/","name":"Migraci\u00f3n de WordHerd a WordPress","description":"Servicios de migraci\u00f3n de sitios web","publisher":{"@id":"https:\/\/wordherd.io\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wordherd.io\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/wordherd.io\/#organization","name":"Migraci\u00f3n de WordHerd a WordPress","url":"https:\/\/wordherd.io\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/wordherd.io\/#\/schema\/logo\/image\/","url":"https:\/\/wordherd.io\/wp-content\/uploads\/wordherd-trademark.png","contentUrl":"https:\/\/wordherd.io\/wp-content\/uploads\/wordherd-trademark.png","width":1000,"height":315,"caption":"WordHerd WordPress Migration"},"image":{"@id":"https:\/\/wordherd.io\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/wordherd.io\/#\/schema\/person\/373419b97c0fbc45a3a16462bdba0fac","name":"WordHerd","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/bf8c7166601a64c6c57b67ffbeab8f8c6a378cca786da9a326c1a34a2ec6f860?s=96&d=mm&r=g","caption":"WordHerd"},"sameAs":["https:\/\/wordherd.io","https:\/\/www.facebook.com\/wordherdio\/","https:\/\/www.linkedin.com\/company\/wordherd","https:\/\/x.com\/wordherdio"],"url":"https:\/\/wordherd.io\/es\/blog\/author\/wordherd\/"}]}},"_links":{"self":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/posts\/5702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/comments?post=5702"}],"version-history":[{"count":0,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/posts\/5702\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/media?parent=5702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/categories?post=5702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/tags?post=5702"},{"taxonomy":"builders","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/builders?post=5702"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/industry?post=5702"},{"taxonomy":"platform","embeddable":true,"href":"https:\/\/wordherd.io\/es\/wp-json\/wp\/v2\/platform?post=5702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}