본문 바로가기
개발자 커뮤니티에 오신 것을 환영합니다!

기타 [vb.net] 파일 삭제 File.Delete / Directory.Exists

페이지 정보

profile_image
작성자 하나를하더라도최선을
댓글 0건 조회 42,993회 작성일 19-10-08 20:12

본문

        Dim Desktop As String = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
        Desktop = String.Concat(Desktop, "\program1472.com")
        Desktop &= "\"
        If Directory.Exists(Desktop) Then
            For Each str As String In My.Computer.FileSystem.GetFiles(Desktop, FileIO.SearchOption.SearchAllSubDirectories, "*.*")
                File.Delete(str)
            Next
        End If

댓글목록

등록된 댓글이 없습니다.


Copyright © program1472 | IT HUB. All rights reserved.