Hi Lynn,
I only know a solution that uses a scripting language but am very interested if a regular solution is available.
Presuming the previous process is finished and the file is stable you can read the size of a file with a script. Depending on the operating system this could be a Command prompt or PowerShell and capture the output post-process. I currently have a Windows job that echos the size of a variable file by the command below. Post-process I scan the report and promote the variable with PSET so I can use it in further steps. In your case this could be an IF workflow with a USER DEFINED condition checking the variable.
Process:
echo off
echo [START_MARKER]
forfiles /p &PATH# /m &FILENAME# /c "cmd /c echo @fsize"
echo [END_MARKER]
Post-Process:
! Define variable to determine whether report content has started
:DEFINE &ISCONTENT#, unsigned
:SET &ISCONTENT# = 0
! Retrieve process report and loop through
:SET &HANDLE# = PREP_PROCESS_REPORT(,,REP, '')
:PROCESS &HANDLE#
: SET &LINE# = GET_PROCESS_LINE(&HANDLE#)
! Determine end marker
: IF &LINE# = '[END_MARKER]'
: SET &ISCONTENT# = 0
: ENDIF
! If content, then process, only allows one line and overwrites when multiple lines are found
: IF &ISCONTENT# = 1
: IF &LINE# <> ''
: SET &VALUE# = &LINE#
: PSET &FILE_SIZE# = CONVERT(unsigned, &VALUE#)
: ENDIF
: ENDIF
! Determine start marker at the end, to exclude marker itself
: IF &LINE# = '[START_MARKER]'
: SET &ISCONTENT# = 1
: ENDIF
:ENDPROCESS
:CLOSE_PROCESS &HANDLE#
I also use an output scan to filter incorrect paths and filenames so the workflow will fail when a file could not be found.
I hope this helps! Good luck,
Jeroen