Skip to content

Instantly share code, notes, and snippets.

View chuckmoore55's full-sized avatar

Chuck Moore chuckmoore55

  • State of Washington, Department of Revenue
  • Tumwater, Washington, U.S.A.
View GitHub Profile
@chuckmoore55
chuckmoore55 / TestForFile_PreCheck
Created July 14, 2015 20:20
Example of how to code generalized JAMS (file-is-there-or-not) PreCheck Job
# simple test-for-file(s)
param( [string] $tgtdir = '.' ,
[string] $tgtfile = '*.*' ,
[string] $notfoundExit = "CancelJobError" )
$_tgtdir = $tgtdir.trimend( '\' )
$_tgt = ( $_tgtdir + '\' + $tgtfile )
write-host ( "... looking for file '" + $_tgt + "'" )