Jump to content

File/folder copying

- - - - -

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

#1
clarkey2r

clarkey2r

    Newbie

  • Members
  • PipPip
  • 10 posts
Hi Guys

I'm making a small app to backup some software I use called MediaPortal. I want to backup any setting selected by the user, folder locations, skin files etc etc.
Now I can get the app to copy files/folders with
My.Computer.FileSystem.CopyDirectory(skinFolder, desktopfolder, True)
but I want it to display some sort of list, like when you install something
C:\Program Files\etc\etc\etc\file.exe...copied
.
At the moment my form just freezes and says "Not Responding" until the folders are copied!

Any help would be much appreciated.

#2
clarkey2r

clarkey2r

    Newbie

  • Members
  • PipPip
  • 10 posts
My.Computer.FileSystem.CopyDirectory(skinFolder, desktopfolder, showUI:=FileIO.UIOption.AllDialogs)

This does all most what I want!

#3
clarkey2r

clarkey2r

    Newbie

  • Members
  • PipPip
  • 10 posts
I will leave it at that for now!

#4
Ray Tawil

Ray Tawil

    Programmer

  • Members
  • PipPipPipPip
  • 108 posts
it is always healthy to add a

try
...
catch

statement to surround your block of quote especially in your case maybe he is not finding the directory that is why, in that case need to display an error so the user will know
Share your Knowledge, It's one way to achieve immortality.
Video Tutorial Channel

#5
Vswe

Vswe

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 9,552 posts
If I understand you right the thing you want is to allow the program to copy the folders without freezing itself while doing it, to do that you'll need to use multi threading, here's a tutorial: http://forum.codecal...-basic-net.html