遍历一个文件夹后查找到的文件放到listbox里面,sorted属性设为true结果如下:
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec1.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec10.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec11.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec12.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec16.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec17.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec3.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec5.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec7.xml
是不是有什么控件或者简单方法可以直接得到正常的排序方式:
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec1.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec3.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec5.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec7.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec10.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec11.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec12.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec16.xml
D:\spi program\ren\MAJ\MAJ01017\Applied Geology\0442225377\c\0442225377_c_sec17.xml里面有可能还嵌套子文件夹
因为急用,又不知道搜什么关键字,搜了一下出来全是乱七八糟的结果,只好发贴了,见笑