process object locking up files
Posted on 2006-11-11
when i have the .createnowindow=True, whenever the copy command is done, it never releases the copied file. I try to delete d:\test.txt when done, and it says being used by another process.
when i put the createnowindow=False it does not do this, but i get a shell pop up window where can see copy going on.
Isn't there a property to keep the createnowindow=True, but hide the window itself?
Dim cmdFile As New Process
.FileName = "cmd.exe"
.arguments ="/c copy c:\test.txt d:\test.txt"
.CreateNoWindow = True
.UseShellExecute = True