Thanks Mark. :) I was waaaaay off with my script.
I took your script and modified it to fit my requirements, but I get this error msg4/9/2015 3:01:09 PM - U0010000 Client '5555', Object 'EVENT.D:\MRATEST\' was not found. Please enter the correct name.
I am not sure what I am doing wrong. I put the path but it doesn't like it. Here's the final product. I tried to put the path every way I know how, but it doesn't work. Could you please look at it and tell me what I am missing. *two sets of eyes are better than one*
Thank you so much for your help and patience!
:SET &src_host# = "WINDEVAGT1.WIN"
:SET &src_login# = "LOGIN.UC4.WIN"
:SET &src_dir# = "d:\MRAtest\"
:SET &src_path# = "d:\MRAtest\*"
:SET &dst_host# = "WINDEVAGT2.WIN"
:SET &dst_login# = "LOGIN.UC4.WIN"
:SET &dst_path# = "d:\Pnumber\"
:SET &hold# = ""
:SET &fid# = PREP_PROCESS(&src_host#,&src_dir#,"UC_LOGIN=&src_login#")
:PROCESS &fid#
: SET &file# = GET_PROCESS_LINE(&fid#)
: PRINT ".. &file#"
: SET &pnum# = SUBSTR(&file#,14,2)
: IF &hold# EQ ""
! First time
: SET &hold# = &pnum#
: ENDIF
: IF &pnum# NE &hold#
: PRINT "Make directory for &hold# & Activate"
! Use an INC so repeat of logic not needed for last transfer.
: SET &pid# = PREP_PROCESS(&dst_host#,"WINCMD","*","mkdir\Pnumber\&hold#","UC_LOGIN=&dst_login#")
: PRINT 'PREP_PROCESS(&dst_host#,"WINCMD","*","mkdir\Pnumber\&hold#","UC_LOGIN=&dst_login#")'
! Logic to check result of above command as required.
: PSET &ft_src_file# = "&src_path#P&hold#*"
: PSET &ft_dst_file# = "&dst_path#P&hold#*"
: SET &rc = ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)
: PRINT 'ACTIVATE_UC_OBJECT(JOBF.MRA.TEST,WAIT,,,,PASS_VALUES)'
! Logic to check result of above command as required.
: SET &hold# = &pnum#
! End of INC
: ENDIF
: ENDPROCESS
! Activate last file transfer
:IF &hold# NE ""
: PRINT "Make directory for &hold# & Activate"
! Use an INC so repeat of logic not needed.
:ELSE
: PRINT "No matching files found for &src_path#"
: ENDIF
!
:STOP MSG,55,"Testing"