Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

VB.NET – Remove Empty Folders

Posted on December 14, 2013December 22, 2019 By David Kittell
'Remove Empty Folders - Start
    Public Shared Sub RemoveEmptyFolders(ByVal path As String)
        Dim directory As New DirectoryInfo(path)
        For Each subDirectory As DirectoryInfo In directory.GetDirectories()
            If subDirectory.GetFiles().Length = 0 Then
                Try
                    subDirectory.Delete()
                Catch ex As Exception

                End Try
            End If
        Next subDirectory
    End Sub
    'Remove Empty Folders - Stop
Originally Posted on December 14, 2013
Last Updated on December 22, 2019
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code VB.NET

Post navigation

Previous post
Next post

Related Posts

C# Date/Time String Conversion

Posted on December 13, 2013December 26, 2018

public string GetLongDate(string Date) { DateTime d = Convert.ToDateTime(Date); string format = "dddd,MMMM dd,yyyy"; string formatteddate = d.ToString(format); return formatteddate; } public string GetDOBDate(string Date) { DateTime d = Convert.ToDateTime(Date); string format = "MM/dd/yyyy"; string formatteddate = d.ToString(format); return formatteddate; } Originally Posted on December 13, 2013Last Updated on December…

Read More

jQuery – Auto Complete Off

Posted on March 14, 2014October 26, 2015

$(document).ready(function(){ $(‘form’).attr(‘autocomplete’, ‘off’); }); Originally Posted on March 14, 2014Last Updated on October 26, 2015 All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what…

Read More

MSSQL – Identity Insert

Posted on March 10, 2014June 15, 2017

— Attempt to insert an explicit ID value of 3; — should return a warning. INSERT INTO products (id, product) VALUES(3, ‘garden shovel’) GO — SET IDENTITY_INSERT to ON. SET IDENTITY_INSERT products ON GO — Attempt to insert an explicit ID value of 3 INSERT INTO products (id, product) VALUES(3,…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes