{"id":169,"date":"2019-06-05T18:20:43","date_gmt":"2019-06-05T18:20:43","guid":{"rendered":"https:\/\/keithratner.live\/optionexplicit\/?p=169"},"modified":"2023-12-27T12:01:01","modified_gmt":"2023-12-27T12:01:01","slug":"getfilepath","status":"publish","type":"post","link":"https:\/\/keithratner.live\/optionexplicit\/getfilepath\/","title":{"rendered":"GetFilePath"},"content":{"rendered":"<pre>Public Function GetFilePath( _\n    sFullFileNameWithPath As String _\n) As String\n    Dim fs As Object\n    Set fs = CreateObject(\"Scripting.FileSystemObject\")\n    GetFilePath = _\n        fs.<span class=\"ILfuVd\" lang=\"en\"><span class=\"hgKElc\"><b>GetAbsolutePathName<\/b><\/span><\/span>( _\n            sFullFileNameWithPath _\n        )\nEnd Function<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Public Function GetFilePath( _ sFullFileNameWithPath As String _ ) As String Dim fs As Object Set fs = CreateObject(&#8220;Scripting.FileSystemObject&#8221;) GetFilePath = _ fs.GetAbsolutePathName( _ sFullFileNameWithPath _ ) End Function<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,4,6,3],"tags":[],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-code","category-distribution","category-snippets","category-vba"],"krwpengineoptions-featuredonwpengineblog":"","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgsIIA-2J","jetpack-related-posts":[{"id":179,"url":"https:\/\/keithratner.live\/optionexplicit\/getfileextension\/","url_meta":{"origin":169,"position":0},"title":"GetFileExtension","author":"Keith","date":"August 12, 2019","format":false,"excerpt":"Public Function GetFileExtension( _ sFullFileNameWithPath As String _ ) As String Dim fs As Object Set fs = CreateObject(\"Scripting.FileSystemObject\") GetFileExtension = _ fs.GetExtensionName( _ sFullFileNameWithPath _ ) Set fs = Nothing End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":155,"url":"https:\/\/keithratner.live\/optionexplicit\/getfilenamefromfullpath\/","url_meta":{"origin":169,"position":1},"title":"GetFileNameFromFullPath","author":"Keith","date":"May 6, 2019","format":false,"excerpt":"Public Function GetFileNameFromFullPath( _ sFullFileNameWithPath As String _ ) as String Dim fs As Object Set fs = CreateObject(\"Scripting.FileSystemObject\") GetFileNameFromFullPath = _ fs.GetFilename( _ sFullFileNameWithPath _ ) Set fs = Nothing End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":175,"url":"https:\/\/keithratner.live\/optionexplicit\/folderexists\/","url_meta":{"origin":169,"position":2},"title":"FolderExists","author":"Keith","date":"July 8, 2019","format":false,"excerpt":"Function FolderExists( _ strCompleteFolderPath As String _ ) As Boolean Dim _ fs As Object Set _ fs = _ CreateObject( _ \"Scripting.FileSystemObject\" _ ) FolderExists = _ fs.FolderExists( _ strCompleteFolderPath _ ) Set _ fs = _ Nothing End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":150,"url":"https:\/\/keithratner.live\/optionexplicit\/getbasename\/","url_meta":{"origin":169,"position":3},"title":"GetBaseName","author":"Keith","date":"May 2, 2019","format":false,"excerpt":"Public Function GetBaseName( _ sFullFileNameWithExtension As String _ ) Dim fs As Object Set fs = CreateObject(\"Scripting.FileSystemObject\") GetBaseName = _ fs.GetBaseName( _ sFullFileNameWithExtension _ ) Set fs = Nothing End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65,"url":"https:\/\/keithratner.live\/optionexplicit\/deleteallfilesinfolder\/","url_meta":{"origin":169,"position":4},"title":"DeleteAllFilesInFolder","author":"Keith","date":"April 4, 2019","format":false,"excerpt":"Public Sub DeleteAllFilesInFolder( _ strPathToFolder As String _ ) Dim _ fs As Object, _ fldr As Object, _ f As Object Set fs = CreateObject(\"Scripting.FileSystemObject\") Set fldr = fs.GetFolder(strPathToFolder) For Each f In fldr.Files Application.StatusBar = _ \"Deleting file \" & _ f.Name & _ \" from folder \"\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"DeleteAllFilesInFolder","src":"https:\/\/i0.wp.com\/keithratner.live\/optionexplicit\/wp-content\/uploads\/sites\/29\/2019\/04\/deleteallfilesinfolder.png?fit=389%2C343&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":96,"url":"https:\/\/keithratner.live\/optionexplicit\/ellipsize\/","url_meta":{"origin":169,"position":5},"title":"Ellipsize","author":"Keith","date":"April 8, 2019","format":false,"excerpt":"Public Function Ellipsize( _ strInput As String, _ Optional MaxLength As Integer = 16 _ ) As String If Len(strInput) > MaxLength Then Ellipsize = Left(strInput, MaxLength) & Chr(133) Else Ellipsize = strInput End If End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/keithratner.live\/optionexplicit\/wp-content\/uploads\/sites\/29\/2019\/04\/ellipsize.png?fit=290%2C237&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":2,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts\/169\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}