hi, how can i detect if sth. is a file or a directory? exists(directory) does tell me if sth. is a directory but exits my script wenn it hits a file. thx pedro