I would like to call the DXL "system" command to delete a directory structure on a Windows box as a quick way to start fresh on my database export. My script then recreates the directory structure and starts populating it with modules exported from the DOORS database. |
Re: DXL "System" command on Windows You might want to try the int win32SystemWait_ (string commandString, string& sResult, int waitTime, Skip envString)
|
Re: DXL "System" command on Windows Mathias Mamsch - Wed Feb 24 14:02:11 EST 2010 You might want to try the int win32SystemWait_ (string commandString, string& sResult, int waitTime, Skip envString)
How does it get used? I have tried a few different ways to call it, but got nothing but errors. |
Re: DXL "System" command on Windows ZenMonkey760 - Wed Feb 24 15:03:46 EST 2010 int win32SystemWait_(string commandString,string& sResult, int waitTime) No documentation but you can find some reference on the old forum files. |
Re: DXL "System" command on Windows I've got a 'system' command that I must wait for, so after the 'system' call I just issue an 'ack(Wait for black window to close...). You could do the same, with some detailed instructions to the user about getting out and back into the folder to make sure its empty, and THEN OK the ack.
|
Re: DXL "System" command on Windows llandale - Wed Feb 24 15:31:19 EST 2010
This works for me:
string result = ""
print win32SystemWait_ ("notepad.exe", result, -1)
print "Thanks: " result "\n"
|
Re: DXL "System" command on Windows
Your post was helpful for us. string Windows_Share = "//srti008a.xyz.com/Testing/*.*" string commandexe = "c:/windows/system32/cmd.exe /c del /Q /F " "\"" Windows_Share "\"" system (commandexe) |
Re: DXL "System" command on Windows C124id - Sat Jan 22 10:58:58 EST 2011
Your post was helpful for us. string Windows_Share = "//srti008a.xyz.com/Testing/*.*" string commandexe = "c:/windows/system32/cmd.exe /c del /Q /F " "\"" Windows_Share "\"" system (commandexe)
I have never seen "/" used as a path separator on a windows shell. Maybe replace it by "\" ? C:\>c:/windows/system32/cmd.exe /C "echo Hallo" Syntaxfehler. C:\>c:\windows\system32\cmd.exe /C "echo Hallo" Hallo
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: DXL "System" command on Windows Mathias Mamsch - Sat Jan 22 12:36:07 EST 2011
I have never seen "/" used as a path separator on a windows shell. Maybe replace it by "\" ? C:\>c:/windows/system32/cmd.exe /C "echo Hallo" Syntaxfehler. C:\>c:\windows\system32\cmd.exe /C "echo Hallo" Hallo
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
It worked. |
Re: DXL "System" command on Windows C124id - Sat Jan 22 10:58:58 EST 2011
Your post was helpful for us. string Windows_Share = "//srti008a.xyz.com/Testing/*.*" string commandexe = "c:/windows/system32/cmd.exe /c del /Q /F " "\"" Windows_Share "\"" system (commandexe) string ErrMess = deleteFile(NameFileFull)
|
Re: DXL "System" command on Windows llandale - Mon Jan 24 16:34:18 EST 2011
Thanks !!
Stat temp_folder = create <<Folder path of string type>>
while (!(null temp_folder)) {
temp_folder = create folder_path
} //continue after the folder is deleted
|
Re: DXL "System" command on Windows Mathias Mamsch - Wed Feb 24 14:02:11 EST 2010 You might want to try the int win32SystemWait_ (string commandString, string& sResult, int waitTime, Skip envString)
Hello, Is there a way to supply arguement to this command. For example if I have to run a program and supply som arguements to it. This command does not seem to work. Please reply back if this can be done Thanks jester |
Re: DXL "System" command on Windows jester76 - Thu Oct 17 17:32:49 EDT 2013 Hello, Is there a way to supply arguement to this command. For example if I have to run a program and supply som arguements to it. This command does not seem to work. Please reply back if this can be done Thanks jester If you read that post to the end, there is actually an example for having arguments to the command. If in your special case it does not work, why not post some code? Regards, Mathias |
Re: DXL "System" command on Windows Mathias Mamsch - Fri Oct 18 06:02:30 EDT 2013 If you read that post to the end, there is actually an example for having arguments to the command. If in your special case it does not work, why not post some code? Regards, Mathias Sorry, here is the code:
Object obj = current system(strCMD) to be replaced with win32SystemWait(strCMD, string& sResult, int waitTime) If possible I want to hide the command windows flying around. Thanks Jester |
Re: DXL "System" command on Windows jester76 - Thu Oct 24 15:34:51 EDT 2013 Sorry, here is the code:
Object obj = current system(strCMD) to be replaced with win32SystemWait(strCMD, string& sResult, int waitTime) If possible I want to hide the command windows flying around. Thanks Jester See this post for an alternative way to launch executables: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014702144. Maybe the shell.inc file can help you with the flying windows. The win32SystemWait uses the shell to launch commands, therefore you will always have shell windows flying around with this one. Regards, Mathias
|
Re: DXL "System" command on Windows Mathias Mamsch - Thu Oct 24 16:04:36 EDT 2013 See this post for an alternative way to launch executables: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014702144. Maybe the shell.inc file can help you with the flying windows. The win32SystemWait uses the shell to launch commands, therefore you will always have shell windows flying around with this one. Regards, Mathias
Hi, I found this code other day and it does not seem to wait. Here is my code:
Object obj = current fnInvokeFile(strCMD)
Stream fInput = read "c:\\temp\\doorscal.txt" // load path to variable
obj."A6" = strValue Added the following function in the inc.
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Am I doing anything wrong? I have a c# program doing calculations and storing them in a file.
|
Re: DXL "System" command on Windows jester76 - Thu Oct 24 16:27:39 EDT 2013 Hi, I found this code other day and it does not seem to wait. Here is my code:
Object obj = current fnInvokeFile(strCMD)
Stream fInput = read "c:\\temp\\doorscal.txt" // load path to variable
obj."A6" = strValue Added the following function in the inc.
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Am I doing anything wrong? I have a c# program doing calculations and storing them in a file.
Double check if your program has really been executed! Invoke getStatus and getOutput to check if anything went wrong. It might just seem, that it did not wait, just because the file was not created? Just run:
The DXL program should freeze on your computer, waiting for Notepad to end. End Notepad and see, if the program unfreezes. If it does not for you, then you might have a platform problem, which makes the Shell code not work on your side. Regards, Mathias |
Re: DXL "System" command on Windows jester76 - Thu Oct 24 16:27:39 EDT 2013 Hi, I found this code other day and it does not seem to wait. Here is my code:
Object obj = current fnInvokeFile(strCMD)
Stream fInput = read "c:\\temp\\doorscal.txt" // load path to variable
obj."A6" = strValue Added the following function in the inc.
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Am I doing anything wrong? I have a c# program doing calculations and storing them in a file.
It did work. but shell/command windows are flying. Is there a way to hide these windows Thanks Jester |
Re: DXL "System" command on Windows jester76 - Thu Oct 24 20:30:47 EDT 2013 It did work. but shell/command windows are flying. Is there a way to hide these windows Thanks Jester Is there perhaps a way to run the command window minimized? |