I am trying to move a file that will be in the same directory as my program to a system directory but it just won't work. I'm not sure *** is wrong!Code:Dim mov As Directory Try mov.Move(app & OldFileName, OldPath & OldFileName) MessageBox.Show("Sucess!")
app = application.StartupPath
OldFileName = "\text.txt"
OldPath = "C:\WINDOWS"
I used the rename() function to rename something and I am going to replace it with the file that is in the folder with my program. File names in the example are different from what I'm actually doing but it doesn't matter.




Reply With Quote