'The File module with a demo. Save the module without the demo. 'Insert the module in an another program. 'Do not copy and paste the module, but only insert this. '============================================================== dim filemanager$(0, 0) path$ = "" 'use your path here if not(File.FillInfo(path$)) then if filemanager$(0, 3) = "" then print "Directory not found." end end if end if print "Number of files: "; File.FilesFound() print "File Tabstrip1.lbf "; if File.Exist("Tabstrip1.lbf") then print "exist." else print "does not exist." end if print "Subdirectory's: "; File.SubDirsFound() print "Filename 10: "; File.Name$(10) print File.DirPath$() print File.FullPath$() print File.SubDir$() '============================================================= function File.FillInfo(pathSpec$) files pathSpec$, filemanager$() File.FillInfo = val(filemanager$(0, 0)) > 0 end function function File.Exist(file$) 'files path$, file$, filemanager$() 'File.Exist = val(filemanager$(0, 0)) > 0 found = 0 i = 1 while i <= val(filemanager$(0, 0)) and not(found) found = filemanager$(i, 0) = file$ i = i + 1 wend File.Exist = found end function function File.FilesFound() files$ = filemanager$(0, 0) File.FilesFound = val(files$) end function function File.SubDirsFound() subDirs$ = filemanager$(0, 1) File.SubDirsFound = val(subDirs$) end function function File.DriveSpec$() File.DriveSpec$ = filemanager$(0, 2) end function function File.DirPath$() File.DirPath$ = filemanager$(0, 3) end function function File.Name$(fileNr) if fileNr <= File.FilesFound() then File.Name$ = filemanager$(fileNr, 0) else File.Name$ = "Filenumber index out of range!" end if end function function File.Size(fileNr) fileSize = val(filemanager$(fileNr, 1)) File.Size = fileSize end function function File.DateTime$(fileNr) File.DateTime$ = filemanager$(fileNr, 2) end function function File.Attribute(fileNr) File.Attribute = val(filemanager$(fileNr, 3)) end function function File.FullPath$() count = val(filemanager$(0, 0)) File.FullPath$ = filemanager$(count + 1, 0) end function function File.SubDir$() count = val(filemanager$(0, 0)) File.SubDir$ = filemanager$(count + 1, 1) end function