[Help] Copying multiple files with the same extension.
Hey guys, i'm currently using this code to try and copy multiple files of the ".txt" extension from one place to another, the only problem is I'm getting this error every time.

My code:
[php]
For Each FileName As String In Directory.GetFiles(TextBox1.Text & "*.txt")
File.Copy( _
FileName, _
Path.Combine((TextBox1.Text & "\Backup cleaner files"), Path.GetFileName(FileName)) _
)
Next FileName
[/php]
Probably something really simple but I'm guessing that it's the '*' that's the illegal character...but I can't get rid of that.

My code:
[php]
For Each FileName As String In Directory.GetFiles(TextBox1.Text & "*.txt")
File.Copy( _
FileName, _
Path.Combine((TextBox1.Text & "\Backup cleaner files"), Path.GetFileName(FileName)) _
)
Next FileName
[/php]
Probably something really simple but I'm guessing that it's the '*' that's the illegal character...but I can't get rid of that.


