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
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
I'm guessing the Y drive is one mapped on your pc, if it isnt mapped on the server then executing a command from the server wont find it. If thats the case you can map the Y drive on the server but preferably use the real path anyway.
To test it log onto the server as the account tm1/cx runs under and try and use the cmd prompt manually, when that works throw it into TI.
Actually you're right, the path that I gave was not supported by the server, so I changed this but it always returns me the same error localization file. In addition, I can not use the command prompt as administrator I am not my PC. Do you think it am because of that I can not use the command in TM1?
One reason for this might be because TM1 still has the file open until it completes the tab that is writing to it. The file is actually named C:\test.txt$ until the tab code is complete. If you have TextOutput or ASCIIOutput in your prolog, try concatenating the files in the Epilog. This may not be the reason, but worth pointing out in this thread.
Having said that, I have also come across instances where the ExecuteCommand([my operation]) fails, and the solution is always to write [my operation] to a .bat, and execute the .bat via ExecuteCommand().