in reply to determining folder or files type

the file tests -f and -d will return true if the file is a file or a directory respectively via -f "/path/to/file"

-nuffin
zz zZ Z Z #!perl