大家好!
这个代码能一次性获取指定路径的全部文件名列表
如果想同时获取这个路径的各文件的创建日期、是否也能一次性获得。
但看到这个示例、好象只能通过循环才能实现?谢谢!
With JSL (to my knowledge) you will have to loop over the file list you get from Files In Directory. You could also Run Program to get the names and creation dates at the same time by using cmd.exe or powershell.
Edit:
You might be able to use Multiple File Import to get the creation dates inside a directory. Take a look @Craige_Hales blog post Directory Tree: Explore Space Used by Folders
非常感谢!
我的目的是想得到这个路径中创建日期最新的那个文件名。
你可以尝试使用Files In Directory,然后打开 N items中最后的一个试试。在我的印象中,文件的排序是按照时间的。希望能帮助到你。
PS C:\Users\Administrator> (dir|where {$_.Mode -like "*a*"}|Sort-Object LastWriteTime -Descending).name[0]