Thanks, Shafqat - I'll try with adding the space after the > sign. I do need to use >> though; to keep a running log of files that were processed (filename.ext is replaced frequently, and the log file keeps track of the date/time & size of each file). If necessary I'll 'touch filename.log' to create the file for appending.
You're right that the exit command shouldn't be needed, but some of my testing resulted in AIE creating the file, but never exiting cmd.exe. The result was that the first run of the AIE exchange would work, but second and subsequent runs failed because the file was still locked open by the "orphaned" cmd.exe. Also a new orphan cmd.exe was created each time the exchange ran, which is very bad. It should work without forcing c:\windows\system32 into the path, and when I get this running I'll try removing the line from the .bat file. Until that time I'll leave it in and hope it doesn't hurt anything. Thanks Again, --Phil From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG] On Behalf Of Shafqat Ayaz Sent: Monday, October 08, 2012 12:34 To: arslist@ARSLIST.ORG Subject: Re: Remedy AIE Question ** Hi try dir c:\temp | find "filename.ext" > c:\temp\filename.log >> is append, sometimes if the file does not exist The append fails, I have no >> idea why. also for some weird reason the space matters. The command will run >> fine from a DOS prompt but will fail if run from within Remedy. Also since >> you are uisng the /c option, you don't need the exit at The end. windows\system32 is always in the global path so you do not need to set that, also since you are running the bat file from within Remedy, it does not set the path anyway. Shafqat Ayaz ________________________________ From: "Longwing, LJ CTR MDA/IC" <lj.longwing....@mda.mil<mailto:lj.longwing....@mda.mil>> To: arslist@ARSLIST.ORG<mailto:arslist@ARSLIST.ORG> Sent: Monday, October 8, 2012 2:28 PM Subject: Re: Remedy AIE Question Phil, I assume you have executed the batch file with the same command line without issue? -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:arslist@ARSLIST.ORG<mailto:arslist@ARSLIST.ORG>] On Behalf Of Murnane, Phil Sent: Monday, October 08, 2012 7:24 AM To: arslist@ARSLIST.ORG<mailto:arslist@ARSLIST.ORG> Subject: Remedy AIE Question ** Good Day, All: I'm having trouble with an AIE job and am hoping someone else may have run into this issue. I'm trying to use the process| feature to set a field with the return value of an external process. Really I'm not interested in the return value, I just want the process to run. The process is c:\windows\system32\cmd.exe /c "c:\temp\filename.bat" and the contents of the .bat file are: set Path=C:\Windows\System32;%Path% dir c:\temp | find "filename.ext" >>c:\temp\filename.log exit That's it - pretty darn simple. So the data field mapping in AIE is process|c:\windows\system32\cmd.exe /c "c:\temp\filename.bat" . The AIE exchange runs successfully, but nothing is logged to the file. There's no indication of any failure in the AIE debug logs. Any thoughts on what I could try? Thanks, --Phil -------------------- Phil Murnane, Principal Consultant Windward IT Solutions, Service Management Practice Email: pmurn...@windwardits.com<mailto:pmurn...@windwardits.com> Mobile: +1-703-896-6435 Web: www.WindwardITS.com<http://www.WindwardITS.com> <http://www.windwardits.com/> _attend WWRUG12 www.wwrug.com<http://www.wwrug.com> ARSlist: "Where the Answers Are"_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org<http://www.arslist.org> attend wwrug12 www.wwrug12.com<http://www.wwrug12.com> ARSList: "Where the Answers Are" _attend WWRUG12 www.wwrug.com<http://www.wwrug.com> ARSlist: "Where the Answers Are"_ _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"