how do you determine if a directory has content within a Build Forge step?
I need to setup a conditional step based on the contents of a folder. I haven't found away to do that yet. Any guidance would be great.
|
One answer
Do you mean _any_ kind of content i.e. 1 or more files
On unix one could do: dir=/some/path/to/examine nfiles=$(find $dir -type f | wc -l) if [ $nfiles -ne 0 ]; then there be content here fi On dos based build "dir /s" might best the way to approach |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
use .bset with backticks
ls
ls semaphore