{"id":779,"date":"2020-05-08T15:18:26","date_gmt":"2020-05-08T07:18:26","guid":{"rendered":"http:\/\/www.yohz.com\/blogs\/?p=779"},"modified":"2020-05-08T15:18:26","modified_gmt":"2020-05-08T07:18:26","slug":"naming-the-exported-files-in-access-ole-export-and-sql-blob-export","status":"publish","type":"post","link":"https:\/\/www.yohz.com\/blogs\/2020\/05\/08\/naming-the-exported-files-in-access-ole-export-and-sql-blob-export\/","title":{"rendered":"Naming the exported files in Access OLE Export and SQL Blob Export"},"content":{"rendered":"<p>When exporting your database blobs to files using <a href=\"https:\/\/www.yohz.com\/aole_details.htm\">Access OLE Export<\/a> and <a href=\"https:\/\/www.yohz.com\/sbe_details.htm\">SQL Blob Export<\/a>, the default naming convention is the row number and column number (of the blob column).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-780\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention01.png\" alt=\"\" width=\"559\" height=\"187\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention01.png 559w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention01-300x100.png 300w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/p>\n<p>For example, if your data set contains 10 rows and 2 columns of blobs (say columns 2 and 5), the files will be named in this way:<\/p>\n<p>0001_0002.&lt;file extension&gt;<br \/>\n0001_0005.&lt;file extension&gt;<br \/>\n0002_0002.&lt;file extension&gt;<br \/>\n0002_0005.&lt;file extension&gt;<br \/>\n&#8230;<br \/>\n0010_0002.&lt;file extension&gt;<br \/>\n0010_0005.&lt;file extension&gt;<\/p>\n<p>You can change the naming convention to use values from the exported table or data set (if running a SQL query).\u00a0 For example, if your table or data set has the following columns:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-784\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2.png\" alt=\"\" width=\"649\" height=\"231\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2.png 649w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2-300x107.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2-624x222.png 624w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/p>\n<p>and you want to name the exported files from the <strong>SalesOrderImage<\/strong> column using the <strong>SalesOrderID<\/strong> value, you would use the following naming convention:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-783 alignnone\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention03.png\" alt=\"\" width=\"555\" height=\"177\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention03.png 555w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention03-300x96.png 300w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/><\/p>\n<p>The exported files will then be named this way:<\/p>\n<ul>\n<li>43659.&lt;file extension&gt;<\/li>\n<li>43660.&lt;file extension&gt;<\/li>\n<li>43661.&lt;file extension&gt;<\/li>\n<\/ul>\n<p>and so on.<\/p>\n<p>Simply enclose any column values you want to use in angled brackets, as in <strong>&lt;SalesOrderID&gt;<\/strong> above.\u00a0 You can combine multiple columns together, so for e.g. using <strong>\u00a0&lt;Category&gt;_&lt;SalesOrderID&gt;<\/strong> will name the files<\/p>\n<ul>\n<li>Bikes_43659.&lt;file extension&gt;<\/li>\n<li>Bikes_43660.&lt;file extension&gt;<\/li>\n<li>Components_43661.&lt;file extension&gt;<\/li>\n<\/ul>\n<p>and so on.<\/p>\n<p>There are also attributes tags you can use as part of the naming convention.\u00a0 We have already described the <strong>&lt;%column%&gt;<\/strong> and <strong>&lt;%row%&gt;<\/strong> tags above.\u00a0 There is also a <strong>&lt;%size%&gt;<\/strong> tag, which would return the file size value.\u00a0 You can freely mix column tags and attribute tags in the naming convention.<\/p>\n<h2>Using tags in output folders<\/h2>\n<p>You can also use column tags as part of the folder naming convention, if you need to store the files in individual folders or grouped by folders.\u00a0 For e.g. in this sample data set:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-784\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2.png\" alt=\"\" width=\"649\" height=\"231\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2.png 649w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2-300x107.png 300w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention02-2-624x222.png 624w\" sizes=\"(max-width: 649px) 100vw, 649px\" \/><\/p>\n<p>if we wanted to group our exported images by the <strong>Category<\/strong> value, we would enter <strong>F:\\exports\\&lt;Category&gt;\\<\/strong> as our output folder naming convention<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-785 alignnone\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention04.png\" alt=\"\" width=\"541\" height=\"107\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention04.png 541w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention04-300x59.png 300w\" sizes=\"(max-width: 541px) 100vw, 541px\" \/><\/p>\n<p>This will result in the first 2 files stored in the <strong>F:\\exports\\Bikes\\<\/strong> folder, the 3rd file in the <strong>F:\\exports\\Components\\<\/strong> folder, and so on.\u00a0 You can use multiple column tags in the folder naming convention if required.\u00a0 <a href=\"https:\/\/www.yohz.com\/aole_details.htm\">Access OLE Export<\/a> and <a href=\"https:\/\/www.yohz.com\/sbe_details.htm\">SQL Blob Export<\/a> will create the folders if they do not already exist, as long as you have the permissions to create those folders.<\/p>\n<h2>OLE-Object types<\/h2>\n<p>For files extracted from OLE-Object packages, you have the option of using the original file name:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-786 alignnone\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention05.png\" alt=\"\" width=\"532\" height=\"165\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention05.png 532w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention05-300x93.png 300w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><\/p>\n<p>or a custom name using column and attribute tags, as described above.\u00a0 If using a custom name, you can use the <strong>&lt;%package_file_name%&gt;<\/strong> tag, allowing you to mix column values with the original package file name e.g.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-787 alignnone\" src=\"http:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention06.png\" alt=\"\" width=\"533\" height=\"154\" srcset=\"https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention06.png 533w, https:\/\/www.yohz.com\/blogs\/wp-content\/uploads\/2020\/05\/naming_convention06-300x87.png 300w\" sizes=\"(max-width: 533px) 100vw, 533px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/www.yohz.com\/blogs\/2020\/05\/08\/naming-the-exported-files-in-access-ole-export-and-sql-blob-export\/\" action=\"like\" colorscheme=\"light\" layout=\"button\"  size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/www.yohz.com\/blogs\/2020\/05\/08\/naming-the-exported-files-in-access-ole-export-and-sql-blob-export\/\" data-type=\"button\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>When exporting your database blobs to files using Access OLE Export and SQL Blob Export, the default naming convention is the row number and column number (of the blob column). For example, if your data set contains 10 rows and 2 columns of blobs (say columns 2 and 5), the files will be named in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[17,44],"tags":[18,109,108,110,48],"_links":{"self":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/779"}],"collection":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/comments?post=779"}],"version-history":[{"count":1,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/779\/revisions"}],"predecessor-version":[{"id":788,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/posts\/779\/revisions\/788"}],"wp:attachment":[{"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/media?parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/categories?post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yohz.com\/blogs\/wp-json\/wp\/v2\/tags?post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}