[Help] How to move files?
Okay i was looking at the file killer and code from something that moved files but yet when i try to take the EXACT code just a different file to a new place it wont move and says there is an error.....anyone happen to know the code?
I have checked from the tutorials from the site it came from itself and it still says error
Code i used:
Code:
Dim Moving As String
Moving = "C:\Desktop\Older\*.png"
Dim Moved As String
Moved = "C:\Desktop\Older\*.png"
If RadioButton1.Checked = True Then
File.Move(Moving, Moved)
End If
it doesnt matter if i put %Desktop% or w/e because it "STILL" says error
vb6? or vbe?
Edit: This is what I found
imports System.IO.File
'FileToMove = "C:\test.txt"
'MoveLocation = "C:\ TestFolder\test.txt"
Youll probably need to Dim FileToMove as string and same for MoveLocation
If System.IO.File.Exists(FileToMove) = True Then
System.IO.File.Move(FileToMove, MoveLocation)
MsgBox("File Moved")
End If
Thank Me If I Helped