View Single Post
 
Old March 20th, 2006, 09:56 AM
phenom phenom is offline
Authorized User
 
Join Date: Feb 2006
Location: Dubai, UAE, United Arab Emirates.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Thearon
 You are going to have to specify the filename as part of the destination. I ran a little sample which worked fine. Without the filename as part of the destination path, I encountered the same error as you did. Here's my code.
Thearon
Imports System.IO
Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strSource As String = "C:\WINDOWS\Greenstone.bmp"
        Dim strDestination As String = "C:\Temp1\" & strSource.Substring(strSource.LastIndexOf("\") + 1)
        File.Copy(strSource, strDestination, True)
    End Sub
End Class
Dear Thearon,

Thank you very very much, it’s working now, I forgot to add the file name to the des, I really appreciate your help…

I have one more question, if you don’t mind…

How can I remove the ReadOnly form a file and a folder?

Thanks again

PHENOM


>>>PHENOM<<<