in reply to How to get list of files with .fmb extension in windows

Does it work better if you change the third line to:

$path = File::Spec->catfile( $directory, "*.fmb" );

Without seeing where you declare @directories, it's difficult to debug the code.