某个文件夹下,有很多图像文件或文件夹,文件名没有编号,遍历图像,用list_files
参数解释
路径(输入) :遍历的路径目录
选项(输入) :遍历文件选项
默认值: 'files'可选值: 'files', 'directories', 'recursive', 'follow_links', 'max_depth 5', 'max_files 1000'
可选值: 文件,路径,子文件夹,(在类unix系统中,可以使用“follow链接”来指定指向文件或目录的符号链接),文件夹深度,最大文件数
* 遍历文件夹C:/dictionary下包括子文件夹所有文件
list_files ('C:/dictionary', ['recursive','follow_links'], ImageFiles)
* 筛选bmp或jpg或png文件
tuple_regexp_select (ImageFiles, ['\\.(bmp|jpg|png)$','ignore_case'], ImageFiles)
* 依次读取图片
for Index := 0 to |ImageFiles| - 1 by 1
read_image (Image, ImageFiles[Index])
(添加处理代码)
stop()
endfor