Jump to content

Create Simple Back Up Application

- - - - -

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

#1
R8ter63

R8ter63

    Newbie

  • Members
  • Pip
  • 4 posts
Hello all. I am new to this forum and have a question. I am using Visual Basic 2008 Express Edition. This is what I want to do:

Copy all files and folders from A to B example: Copy From C:\Source to \\Server1\Dest

I also am trying to use a progress bar to show the actual progress. Which hasn't worked. I can't time it because the number of files varies from day to day.

I would also like to pull variables from a text file or config file for example what the source path is and what the destination path is. I want this to be predetermined so the whole process is automated. Any help would be great. I have scrapped this project like five time. Thanks in advance.

#2
sam_l

sam_l

    Learning Programmer

  • Members
  • PipPipPip
  • 52 posts
My.Computer.FileSystem.CopyFile Method

#3
R8ter63

R8ter63

    Newbie

  • Members
  • Pip
  • 4 posts

sam_l said:


That would work to copy one file at a time. I found My.Computer.FileSystem.CopyDirectory but it keeps throwing an exception stating that PathTooLongException was unhandled but I am sure my path names are under 248 characters. Any thoughts?

#4
R8ter63

R8ter63

    Newbie

  • Members
  • Pip
  • 4 posts
I link was helpful a little. I don't want to have to copy one file at a time. There can be anywhere from 200 to 1000 files. I did find a link from the one above that touched on copying folders but I keep getting an exception about the Path being too long.