$findfile: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
m first!
(No difference)

Revision as of 16:22, 20 October 2007

Finds files in a specified directory.

 $findfile(dir,matchstring,N[,depth][,@window | command])

Returns the N'th matching filename, or when N=0 the number of matching filenames.

dir is the directory in which has to be searched.

matchstring is the string to match the filename.

depth is how many dirs deep have to be searched. If depth is 0 or 1, it will only search the specified dir without it's subdirs. In case you don't specify depth it will search all subdirs.

If you specify a custom window name @window which has a listbox, it will add the found files to the listbox.

If you specify the command this command will be executed for each found file, where $1- is the filename.