How do you check if files exist?

Discussion created by Wolfgang_Brueckler_1288 on Mar 1, 2017

We recently upgraded our Test ENV from V9 to V11.2 very smoothly and are now checking the possibilities to enhance our Scripts and objects with the new V11 functions.

We encountered a major issue (for us) when doing a simple check if a file exists. Sounds crazy - but we are stuck a little bit and I personally have no glance how to proceed.

ENV: Win and Linux/Unix on approx. 10 different machines
WHAT: mostly csv files in almost every size from XKB to XXGB, huge amount of files, almost every job checks in prescript if the file exists
REQUEST: we want a script or include that is able to quickly check if a file (including symbolic links) exists or not

Object / Function                  SYMLINKs recognized           disadvatages
prep_process_filename                            NO                            
prep_process with EVENT.****CMD    YES             2 solutions necessary for unix/win incl. script logic (processing Report)
prep_process_file                                    YES                 the file is parsed by AE just to check if it exists (Performance loss)
Vara.filelist                                              NO                            
vara.backend                                           YES                output format not freely selectable - no scriptvara supported in "Colums" field, 2 solutions necessary for unix/windows
UNIX / Win JOB                                    YES                2 solutions necessary for unix/win incl. script logic (processing Report)
GENERIC.JOB                                        YES              2 solutions necessary for unix/win incl. script logic (processing Report)
EVNT.FILE                                            YES                very slow - the script has to wait until the event is being triggered, 2 solutions necessary for unix/windows

As both script functions that would avoid double programming time do not support symbolic links we must use any OS commands. This requires a lot of programming effort, cause the output of both commands is not unique and we must parse (partly) the report or returned lines for consistency and for the value)

So it seems that there is the only useful solution for us to use prep_process with EVENT.UNIXCMD or EVENT.WINCMD

Interestingly VARA.filelist recognizes symlinks in WIN but not in linux.

==> How is your setup for checking (big) files and symlinks in your win/unix environments?

many thanks for your inputs