![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Jan 2005
Location: Albany, NY
Posts: 43
Rep Power: 0
![]() |
Moving files....
Okay, so I'm using VB.net 2005 (just to let all of you know). What I want to do, is have it so that when a button is clicked, it moves a certain folder from one location, to another, and over writes the folder if necessary. Can someone hook me up with a tutorial or script? Thanks in advance!
![]() |
|
|
|
|
|
#2 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
This is where IO.Directory comes in. It has functions to tell if a directory exists and to move them. So it comes down to some simple pseudocode:
if the target directory exists
tell the user
stop
otherwise
move the source to target |
|
|
|
|
|
#3 |
|
Programming Guru
![]() ![]() ![]() |
welcome to .NET this will work in VB.Net AND C# .Net
Environment.Directory.Exists(DIRVAR) Environment.File.Exists(FILEVAR)
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#4 | |
|
Programmer
Join Date: Jan 2005
Location: Albany, NY
Posts: 43
Rep Power: 0
![]() |
Thanks
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|