spacer
cornerspacercorner
Reply
Employee
mpolicarpio
Posts: 1,240
Registered: 05-11-2010
0 Kudos

Re: Using a post receive exit script to copy or rename a file after the initial transfer

Try specifying the full path to the mv command.   To find out where mv is located, login onto your linux box and type the command "type mv".  Different flavors of Linux may have mv in a different location.  An example is below:

 

supsuse10:~ # type mv
mv is /bin/mv

 

 

In your exitdata, specify /bin/mv instead of mv.    The same will be true of the cp and the ls commands.    

 

Advisor
MarkV
Posts: 27
Registered: 05-24-2010
0 Kudos

Re: Using a post receive exit script to copy or rename a file after the initial transfer

We did find the mv command in the  /bin/mv location.  We changed the  exit data to:

 

 

 

Which was interpreted as:

 

/bin/mv /appl/softgrocer/data/aplhst/TEMP_HOSTDN20100623000000000000TEST.DAT HOSTDN20100623000000000000TEST.DAT

The errors received were basically the same:

 

command is: /bin/mv /appl/softgrocer/data/aplhst/TEMP_HOSTDN20100623000000000000TEST.DAT HOSTDN20100623000000000000TEST.DAT
/bin/mv' is not recognized as an internal or external command operable program or batch file.

 

and

 

Post_Rec_Exit_Point</activity>
xmoSysCall():2</locationCode>
The system call failed</message>

 

/bin/mv /appl/softgrocer/data/aplhst/TEMP_$XMDM_ORIGINAL_NAME$ $XMDM_ORIGINAL_NAME$

Employee
mpolicarpio
Posts: 1,240
Registered: 05-11-2010
0 Kudos

Re: Using a post receive exit script to copy or rename a file after the initial transfer

 

Are you sure the exit service being called is on the Linux node?  The reason I ask is that the line

 

"/bin/mv' is not recognized as an internal or external command operable program or batch file"

 

occurs only on a Windows node.   You can recreate the same exact error text by opening a windows command prompt

and entering a command that does not exist.  

 

I was also able to produce the same error text in my Windows Exit Service log by specifying exitdata as the /bin/mv command but specfying the Exit QM as a Windows node instead of a Linux node.

 

Employee
Ethan Beisher
Posts: 378
Registered: 05-10-2010
0 Kudos

Re: Using a post receive exit script to copy or rename a file after the initial transfer

Add the mv command to a shell script. 

 

mv %1 %2

 

and then call the shell script instead of the mv command. Does that work for you?

Ethan Beisher
Solutions Engineer
Business Process Solutions
line spacer line
spacerFollow Metastorm on:
spacer Twitter YouTube Blog iTunes LinkedIn Metastorm Community Central, MC2
spacer Copyright © 2011 OpenText Corporation. All Rights Reserved.spacer About Metastormspacer Privacyspacer Legalspacer Site Mapspacer RSSspacer Contact Us
Microsoft Gold Certified Partner
Powered by Windows Azure
line spacer line