{"id":8,"date":"2013-08-01T11:30:48","date_gmt":"2013-08-01T10:30:48","guid":{"rendered":"http:\/\/ketandesai.co.uk\/?p=8"},"modified":"2026-03-22T15:44:49","modified_gmt":"2026-03-22T15:44:49","slug":"find-next-avalable-drive-letter","status":"publish","type":"post","link":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/","title":{"rendered":"Find Next Available Drive Letter"},"content":{"rendered":"\n<p>Sometimes when i&nbsp;cam creating a script to install an application&nbsp;or set up a network share, I&nbsp;come across the problem that the user is using the drive letter for another mapping.<\/p>\n\n\n\n<p>So I wrote a small script to display the next usable drive letter<\/p>\n\n\n\n<p>This script is written in vbs<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#FFFFFF\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly> \n'************************************************************************\n'*\n'* The script finds next available drive letter\n'*\n'************************************************************************\n\nOPTION EXPLICIT\n\n'****************** Variables Declaration ******************************\nDim dict\nDim nextDrive\n\n'****************** Objects initialization ******************************\nSet dict\u00a0= CreateObject(\"Scripting.Dictionary\")\n\nFillDrives\u00a0dict\n\n'Finding next available network drive\nnextDrive\u00a0= GetNextDriveLetter(dict)\n\n'Map Network drive section\nIf (nextDrive = \"-1\") then\nwscript.echo \"There is no place to put the map\"\nElse\n\nwscript.echo \"The next available drive was: \" &amp; nextDrive\n\nEnd if\n\n'***************** Clean used objects ***********************************\nSet dict = Nothing\n\n'***************** Functions and procedures *****************************\nFunction GetNextDriveLetter(ByRef\u00a0dict)\n\nDim f, drive, curDrive, Items, i\n\n'Assign default value to the function - in case there are no drives\nGetNextDriveLetter = \"-1\"\n\n'Create FSO object\nSet f = CreateObject(\"Scripting.FileSystemObject\")\n\n'Go over all mapped drives in current computer(with FSO)\n'and receive into curDrive the letter of the last used letter for mapping\nFor Each drive in f.drives\ncurDrive = left(drive,1)\n\n'Assign the dictionary value to true(the drive exists)\ndict(curDrive) = true\nNext\n\n'Go over all the items in the dictionary. The first one with value \"false\" we return as function result\nItems = dict.Items ' Get the items.\nFor i = 0 To dict.Count -1 ' Iterate the array.\nIf (Items(i) = false) Then\nGetNextDriveLetter\u00a0= CHR(ASC(\"A\") + i)\nExit For\nEnd If\nNext\nEnd Function\n\nSub FillDrives(ByRef\u00a0dict)\n\nDim i\n\n'Fill the table of available letters (A-C) with True\nFor i = ASC(\"A\") to ASC(\"C\")\ndict.Add CHR(i), true\nNext\n'Fill the table of available letters (D-Z) with False\nFor i = ASC(\"D\") to ASC(\"Z\")\ndict.Add CHR(i), false\nNext\nEnd Sub\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;************************************************************************<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;* The script finds next available drive letter<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;*<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;************************************************************************<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">OPTION EXPLICIT<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;****************** Variables Declaration ******************************<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Dim<\/span><span style=\"color: #001080\"> dict<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Dim<\/span><span style=\"color: #001080\"> nextDrive<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;****************** Objects initialization ******************************<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Set <\/span><span style=\"color: #001080\">dict<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #795E26\">CreateObject<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Scripting.Dictionary&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">FillDrives\u00a0dict<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Finding next available network drive<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">nextDrive<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #795E26\">GetNextDriveLetter<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">dict<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Map Network drive section<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> (<\/span><span style=\"color: #001080\">nextDrive<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;-1&quot;<\/span><span style=\"color: #000000\">) <\/span><span style=\"color: #AF00DB\">then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">wscript.echo <\/span><span style=\"color: #A31515\">&quot;There is no place to put the map&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Else<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">wscript.echo <\/span><span style=\"color: #A31515\">&quot;The next available drive was: &quot;<\/span><span style=\"color: #000000\"> &amp;<\/span><span style=\"color: #001080\"> nextDrive<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">End if<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;***************** Clean used objects ***********************************<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Set <\/span><span style=\"color: #001080\">dict<\/span><span style=\"color: #000000\"> =<\/span><span style=\"color: #0000FF\"> Nothing<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;***************** Functions and procedures *****************************<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Function<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">GetNextDriveLetter<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">ByRef\u00a0dict<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Dim<\/span><span style=\"color: #001080\"> f, drive<\/span><span style=\"color: #000000\">,<\/span><span style=\"color: #001080\"> curDrive<\/span><span style=\"color: #000000\">,<\/span><span style=\"color: #001080\"> Items<\/span><span style=\"color: #000000\">,<\/span><span style=\"color: #001080\"> i<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Assign default value to the function - in case there are no drives<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">GetNextDriveLetter<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #A31515\">&quot;-1&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Create FSO object<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Set <\/span><span style=\"color: #001080\">f<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #795E26\">CreateObject<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Scripting.FileSystemObject&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Go over all mapped drives in current computer(with FSO)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;and receive into curDrive the letter of the last used letter for mapping<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">For<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">Each<\/span><span style=\"color: #000000\"> drive in f.drives<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">curDrive<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #795E26\">left<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">drive<\/span><span style=\"color: #000000\">,<\/span><span style=\"color: #098658\">1<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Assign the dictionary value to true(the drive exists)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #795E26\">dict<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">curDrive<\/span><span style=\"color: #000000\">) =<\/span><span style=\"color: #0000FF\"> true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Next<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Go over all the items in the dictionary. The first one with value &quot;false&quot; we return as function result<\/span><\/span>\n<span class=\"line\"><span style=\"color: #795E26\">Items<\/span><span style=\"color: #000000\"> = dict.<\/span><span style=\"color: #795E26\">Items<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #008000\">&#39; Get the items.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">For<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">i<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #098658\">0<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">To<\/span><span style=\"color: #000000\"> dict.<\/span><span style=\"color: #001080\">Count<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #098658\">-1<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #008000\">&#39; Iterate the array.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">If<\/span><span style=\"color: #000000\"> (<\/span><span style=\"color: #795E26\">Items<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">i<\/span><span style=\"color: #000000\">) =<\/span><span style=\"color: #0000FF\"> false<\/span><span style=\"color: #000000\">) <\/span><span style=\"color: #AF00DB\">Then<\/span><\/span>\n<span class=\"line\"><span style=\"color: #001080\">GetNextDriveLetter<\/span><span style=\"color: #000000\">\u00a0= <\/span><span style=\"color: #795E26\">CHR<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #795E26\">ASC<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;A&quot;<\/span><span style=\"color: #000000\">) +<\/span><span style=\"color: #001080\"> i<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Exit For<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">End If<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Next<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Function<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Sub<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">FillDrives<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">ByRef\u00a0dict<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">Dim<\/span><span style=\"color: #001080\"> i<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Fill the table of available letters (A-C) with True<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">For<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">i<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #795E26\">ASC<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;A&quot;<\/span><span style=\"color: #000000\">) <\/span><span style=\"color: #AF00DB\">to<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">ASC<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;C&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">dict.<\/span><span style=\"color: #795E26\">Add<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">CHR<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">i<\/span><span style=\"color: #000000\">),<\/span><span style=\"color: #0000FF\"> true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Next<\/span><\/span>\n<span class=\"line\"><span style=\"color: #008000\">&#39;Fill the table of available letters (D-Z) with False<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">For<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">i<\/span><span style=\"color: #000000\"> = <\/span><span style=\"color: #795E26\">ASC<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;D&quot;<\/span><span style=\"color: #000000\">) <\/span><span style=\"color: #AF00DB\">to<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">ASC<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #A31515\">&quot;Z&quot;<\/span><span style=\"color: #000000\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">dict.<\/span><span style=\"color: #795E26\">Add<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">CHR<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">i<\/span><span style=\"color: #000000\">),<\/span><span style=\"color: #0000FF\"> false<\/span><\/span>\n<span class=\"line\"><span style=\"color: #AF00DB\">Next<\/span><\/span>\n<span class=\"line\"><span style=\"color: #0000FF\">End Sub<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes when i&nbsp;cam creating a script to install an application&nbsp;or set up a network share, I&nbsp;come across the problem that the user is using the drive letter for another mapping. So I wrote a small script to display the next usable drive letter This script is written in vbs<\/p>\n","protected":false},"author":1,"featured_media":1025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,7,10],"tags":[4,6,8,9],"class_list":["post-8","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","category-vbs","category-windows","tag-drive-mapping","tag-scripting-2","tag-vbs-2","tag-windows-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Find Next Available Drive Letter<\/title>\n<meta name=\"description\" content=\"Find Next Available Drive Letter\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Find Next Available Drive Letter\" \/>\n<meta property=\"og:description\" content=\"Find Next Available Drive Letter\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/\" \/>\n<meta property=\"og:site_name\" content=\"Ketan Desai\" \/>\n<meta property=\"article:published_time\" content=\"2013-08-01T10:30:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-22T15:44:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ketan Desai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ketan Desai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/\"},\"author\":{\"name\":\"Ketan Desai\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"headline\":\"Find Next Available Drive Letter\",\"datePublished\":\"2013-08-01T10:30:48+00:00\",\"dateModified\":\"2026-03-22T15:44:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/\"},\"wordCount\":60,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"image\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"keywords\":[\"drive mapping\",\"scripting\",\"vbs\",\"windows\"],\"articleSection\":[\"Scripting\",\"VBS\",\"Windows\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/\",\"name\":\"Find Next Available Drive Letter\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"datePublished\":\"2013-08-01T10:30:48+00:00\",\"dateModified\":\"2026-03-22T15:44:49+00:00\",\"description\":\"Find Next Available Drive Letter\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#primaryimage\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"contentUrl\":\"https:\\\/\\\/ketandesai.co.uk\\\/wp-content\\\/uploads\\\/2013\\\/08\\\/VBS-Script.png\",\"width\":1536,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/2013\\\/08\\\/01\\\/find-next-avalable-drive-letter\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ketandesai.co.uk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Find Next Available Drive Letter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#website\",\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/\",\"name\":\"Ketan Desai\",\"description\":\"Anything IT\",\"publisher\":{\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ketandesai.co.uk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/ketandesai.co.uk\\\/#\\\/schema\\\/person\\\/76fbe7aaa79643c166c5c2475fc01424\",\"name\":\"Ketan Desai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\",\"caption\":\"Ketan Desai\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g\"},\"sameAs\":[\"http:\\\/\\\/staging.ketandesai.co.uk\"],\"url\":\"https:\\\/\\\/ketandesai.co.uk\\\/index.php\\\/author\\\/ketandesaiadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Find Next Available Drive Letter","description":"Find Next Available Drive Letter","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:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/","og_locale":"en_GB","og_type":"article","og_title":"Find Next Available Drive Letter","og_description":"Find Next Available Drive Letter","og_url":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/","og_site_name":"Ketan Desai","article_published_time":"2013-08-01T10:30:48+00:00","article_modified_time":"2026-03-22T15:44:49+00:00","og_image":[{"width":1536,"height":1024,"url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","type":"image\/png"}],"author":"Ketan Desai","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ketan Desai","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#article","isPartOf":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/"},"author":{"name":"Ketan Desai","@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"headline":"Find Next Available Drive Letter","datePublished":"2013-08-01T10:30:48+00:00","dateModified":"2026-03-22T15:44:49+00:00","mainEntityOfPage":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/"},"wordCount":60,"commentCount":0,"publisher":{"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"image":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#primaryimage"},"thumbnailUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","keywords":["drive mapping","scripting","vbs","windows"],"articleSection":["Scripting","VBS","Windows"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/","url":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/","name":"Find Next Available Drive Letter","isPartOf":{"@id":"https:\/\/ketandesai.co.uk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#primaryimage"},"image":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#primaryimage"},"thumbnailUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","datePublished":"2013-08-01T10:30:48+00:00","dateModified":"2026-03-22T15:44:49+00:00","description":"Find Next Available Drive Letter","breadcrumb":{"@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#primaryimage","url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","contentUrl":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/ketandesai.co.uk\/index.php\/2013\/08\/01\/find-next-avalable-drive-letter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ketandesai.co.uk\/"},{"@type":"ListItem","position":2,"name":"Find Next Available Drive Letter"}]},{"@type":"WebSite","@id":"https:\/\/ketandesai.co.uk\/#website","url":"https:\/\/ketandesai.co.uk\/","name":"Ketan Desai","description":"Anything IT","publisher":{"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ketandesai.co.uk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/ketandesai.co.uk\/#\/schema\/person\/76fbe7aaa79643c166c5c2475fc01424","name":"Ketan Desai","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g","caption":"Ketan Desai"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/6587572e3884edb2f25ce127069b15f15da32278153bc9b4d2568156fcb6ec41?s=96&d=mm&r=g"},"sameAs":["http:\/\/staging.ketandesai.co.uk"],"url":"https:\/\/ketandesai.co.uk\/index.php\/author\/ketandesaiadmin\/"}]}},"jetpack_featured_media_url":"https:\/\/ketandesai.co.uk\/wp-content\/uploads\/2013\/08\/VBS-Script.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":1,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":1026,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/8\/revisions\/1026"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/media\/1025"}],"wp:attachment":[{"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ketandesai.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}