Welcome to Dream.In.Code
Getting VB.NET Help is Easy!

Join 136,310 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,471 people online right now. Registration is fast and FREE... Join Now!




how to update a file after moved

 
Reply to this topicStart new topic

how to update a file after moved

TADS
15 Oct, 2008 - 10:53 AM
Post #1

New D.I.C Head
Group Icon

Joined: 9 Aug, 2008
Posts: 20


My Contributions
hi all,

now im on the last bit of my tool i have been making i have come across a error when i move my file to a new dir and then want to convert the file it wont let me its like vb.net is still using it and wont do anything with it unless i close the app down and open it again this is the code im using to move/copy my file

CODE


Dim pic As FileInfo


        Try
            pic = New FileInfo(TextBox1.Text)

            If pic.Exists() Then
                pic.CopyTo("C:\mydir\" & RichTextBox1.Text & ".tga")
                MsgBox("Moved Successfully! ") 'add this in testing to make sure its working

            Else
                MsgBox("ERROR in Moving File")
            End If
        Finally

        End Try


i have also used

me.update()

but not sure on how to tell my app to let go of the file so i can then do something else with it!..

i have started this topic as it is not the same as the running a .bat! (i hope mods dont mind)

thanks in advance

Kev

This post has been edited by TADS: 15 Oct, 2008 - 10:54 AM
User is offlineProfile CardPM
+Quote Post

modi123_1
RE: How To Update A File After Moved
15 Oct, 2008 - 12:09 PM
Post #2

D.I.C Addict
Group Icon

Joined: 12 Jun, 2008
Posts: 531



Thanked: 13 times
Dream Kudos: 100
My Contributions
close out, destroy, or null the object that had the connection to it.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 06:42AM

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month