Execute command problem
Posted: Thu May 22, 2014 6:01 am
Hi everyone,
Yesterday I posted in the forum a problem. This one was about "how to copy a file after another one" I mean the content. For this I'm trying to use Execute command to use windows command. My code is as follows :
But TM1 says "Error: Prolog procedure line (52): The system cannot find the file specified." and I don't know how.At first I wanted to use the vbscript but I do not know if this is possible
Thanks a lot for your help 
Yesterday I posted in the forum a problem. This one was about "how to copy a file after another one" I mean the content. For this I'm trying to use Execute command to use windows command. My code is as follows :
Code: Select all
vFileName1 = 'Y:\1-ENTREE\ImportSAP\Toto1.csv';
vFileName2 = 'Y:\1-ENTREE\ImportSAP\Toto2.csv';
vCmd = 'copy ' | vFileName1 | ' ' | vFileName2 ;
ExecuteCommand (vCmd,0);
Code: Select all
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\test.txt") Then
objFSO.CopyFile "C:\test.txt" , "C:\test2.txt"
Else
MsgBox "Fichier C:\test.txt introuvable", vbExclamation
End If
Set objFSO = Nothing
