Hello to all.
This is my first post, i believe that is easily solve
I have a file a.txt in c:\ and want to rename it to b.txt, this should run in "batch" i have this code to do it.
On p.start() gives the exception file can be found.
Thanks for your time.
This is my first post, i believe that is easily solve
I have a file a.txt in c:\ and want to rename it to b.txt, this should run in "batch" i have this code to do it.
VB.NET:
If File.Exists("c:\a.txt") Then
Dim p As Process
p = New Process
p.StartInfo.FileName = "ren"
p.StartInfo.WorkingDirectory = "C:\"
p.StartInfo.Arguments = "C:\a.txt b.txt"
p.Start()
Else
sError = New LogsFile("File doesn't exists.", "ERROR: ")
sError.NotifyLogs() ' write to log file the error
End If
On p.start() gives the exception file can be found.
Thanks for your time.