Hello ,
I have this code but its just not working and i cant findout why Ihaven't any errors in compiling but it doesn't do anything at all
If anyone has an idea or a link please help I have found this code in this link
http://www.homeandlearn.co.uk/NET/nets8p7.html
I noticed that if I put a specific file name such as file.txt is working but i want to take all the files with txt extension. As they have told me in another forum this function doesn't support wildcards such as (*) is there another way to move all the *.txt files without knowing their names?
Thank you in advance
I have this code but its just not working and i cant findout why Ihaven't any errors in compiling but it doesn't do anything at all
If anyone has an idea or a link please help I have found this code in this link
http://www.homeandlearn.co.uk/NET/nets8p7.html
I noticed that if I put a specific file name such as file.txt is working but i want to take all the files with txt extension. As they have told me in another forum this function doesn't support wildcards such as (*) is there another way to move all the *.txt files without knowing their names?
Thank you in advance
VB.NET:
Imports System.IO
Imports System.Diagnostics
Imports System.IO.File (FileToMove1, MoveLocation1)
Dim FileToMove1 As String
Dim MoveLocation1 As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If System.IO.File.Exists(FileToMove1) = True Then
System.IO.File.Move(FileToMove1, MoveLocation1)
End If
FileToMove1 = "E:\800\*.txt"
MoveLocation1 = "E:\800\temp\"
End Sub
Last edited by a moderator: