Jump to content

How to seek a folder I have made in drive "C"

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
dpgodage

dpgodage

    Newbie

  • Members
  • Pip
  • 1 posts
Hello frineds
I have made a VB6 project to copy a folder in drive "C" when form launchs. When I launch the form next time I want to know If it exists in drive "C" and I want to stop copying it again to the drive "C" Please let me kmow how to do this with Vb6
dpgodage

#2
enigmavj

enigmavj

    Newbie

  • Members
  • Pip
  • 1 posts
i suggest you to post your code so that we can help you out what you are looking out for :)

#3
lemontree

lemontree

    Newbie

  • Members
  • Pip
  • 2 posts
suggest you to post your code so that we can help you out what you are looking out for

Read more: How to seek a folder I have made in drive "C"

#4
Sharper_Software

Sharper_Software

    Newbie

  • Members
  • PipPip
  • 17 posts

dpgodage said:

Hello frineds
I have made a VB6 project to copy a folder in drive "C" when form launchs. When I launch the form next time I want to know If it exists in drive "C" and I want to stop copying it again to the drive "C" Please let me kmow how to do this with Vb6
dpgodage

        'the Folder i have and want to copy to a new location
        Dim SourceFolder As String = "C:\Example"
        'the end location i want my folder to be
        Dim CopiedFolder As String = "C:\Folder\Example"
        Dim folderExists As Boolean

        Try
            folderExists = My.Computer.FileSystem.DirectoryExists(CopiedFolder)
            If folderExists = True Then
                'Dont copy, its already there
            Else
                'Its not there, Copy the folder again
                My.Computer.FileSystem.CopyDirectory(SourceFolder, CopiedFolder)
            End If
        Catch ex As Exception
            MsgBox("My Computer is Too Stupid to Complete this Simple task, It Failed Because " & ex.Message, MsgBoxStyle.Critical)
        End Try


#5
stojanda

stojanda

    Newbie

  • Members
  • Pip
  • 2 posts
gfdsgfdsfsdf