Atitit 遍历文件夹算法 autoit attilax总结

_FileListToArray

Lists files and\or folders in a specified folder (Similar to using Dir with the /B Switch)

#include <File.au3>
_FileListToArray ( $sFilePath [, $sFilter = "*" [, $iFlag = $FLTA_FILESFOLDERS [, $bReturnPath = False]]] )

Parameters

$sFilePath

Folder to generate filelist for.

$sFilter

[optional] the filter to use, default is *. (* and ? wildcards accepted - See Remarks)

$iFlag

[optional] specifies whether to return files folders or both
    $FLTA_FILESFOLDERS (0) = (Default) Return both files and folders
    $FLTA_FILES (1) = Return files only
    $FLTA_FOLDERS (2) = Return Folders only
    Constants are defined in FileConstants.au3

$bReturnPath

[optional] If True the full path is appended to the file\folder path, otherwise it is relative to the $sFilePath folder. Default is False.

Return Value

Success:

A one-dimensional array.
    $aArray[0] = Number of Files\Folders returned
    $aArray[1] = 1st File\Folder
    $aArray[2] = 2nd File\Folder
    $aArray[3] = 3rd File\Folder
    $aArray[n] = nth File\Folder

Failure:

sets the @error flag to non-zero.

@error:

1 - Folder not found or invalid
2 - Invalid $sFilter
3 - Invalid $iFlag
4 - No File(s) Found

#include <Array.au3>

#Include <File.au3>

$path="C:\Users\Administrator.ATTILAXPC188\Documents\r2d"

$filelist = _FileListToArray ($path)

ConsoleWrite("-----ret")

ConsoleWrite(UBound( $filelist))

For $i=0 To UBound( $filelist)-1

ConsoleWrite($filelist[$i]&@CR&@LF)

next

ConsoleWrite (" ex:"&@error)

ConsoleWrite("-----end")

Func aa()

EndFunc

Ahk

;filelist

#Persistent

; C:\d\AutoHotKey\AutoHotkey.exe C:\0workspace\atiplat_eeJS\systray\filelist.ahk

; $path="C:\Users\Administrator.ATTILAXPC188\Documents\r2d"

Loop,C:\Users\Administrator.ATTILAXPC188\Documents\r2d\*.*,,1

{

;msgbox,%A_LoopFileName%

msgbox,%A_LoopFileFullPath%    ;full path of file

;%A_LoopFileName%

}

作者:: 绰号:老哇的爪子claw of Eagle 偶像破坏者Iconoclast image-smasher

捕鸟王"Bird Catcher  kok  虔诚者Pious 宗教信仰捍卫者 Defender Of the Faith. 卡拉卡拉红斗篷 Caracalla red cloak 万兽之王

简称:: Emir Attilax Akbar 埃米尔 阿提拉克斯 阿克巴

全名::Emir Attilax Akbar bin Mahmud bin  attila bin Solomon bin adam Al Rapanui 埃米尔 阿提拉克斯 阿克巴 本 马哈茂德 本 阿提拉 本 所罗门 本亚当  阿尔 拉帕努伊

常用名:艾提拉(艾龙),  EMAIL:1466519819@qq.com

头衔:uke总部o2o负责人,全球网格化项目创始人,

uke交友协会会长  uke捕猎协会会长 Emir Uke部落首席大酋长,

uke宗教与文化融合事务部部长, uke宗教改革委员会副主席

uke制度与重大会议委员会委员长,uke保安部首席大队长,uke制度检查委员会副会长,

uke 首席cto   软件部门总监 技术部副总监  研发部门总监主管  产品部副经理 项目部副经理   uke科技研究院院长 uke软件培训大师

uke波利尼西亚区大区连锁负责人 汤加王国区域负责人 uke克尔格伦群岛区连锁负责人,莱恩群岛区连锁负责人,uke布维岛和南乔治亚和南桑威奇群岛大区连锁负责人

Uke软件标准化协会理事长理事长 Uke 数据库与存储标准化协会副会长

uke终身教育学校副校长   Uke医院 与医学院方面的创始人

uec学院校长, uecip图像处理机器视觉专业系主任   uke文档检索专业系主任

Uke图像处理与机器视觉学院首席院长

Uke 户外运动协会理事长  度假村首席大村长   uke出版社编辑总编

转载请注明来源:attilax的专栏  ?http://blog.s.net/attilax

--Atiend  v8

Atitit 遍历文件夹算法 autoit attilax总结的更多相关文章

  1. Java多线程遍历文件夹,广度遍历加多线程加深度遍历结合

    复习IO操作,突然想写一个小工具,统计一下电脑里面的Java代码量还有注释率,最开始随手写了一个递归算法,遍历文件夹,比较简单,而且代码层次清晰,相对易于理解,代码如下:(完整代码贴在最后面,前面是功 ...

  2. C#遍历文件夹下所有文件

    FolderForm.cs的代码如下: using System; using System.Collections.Generic; using System.Diagnostics; using ...

  3. windowsAPI遍历文件夹(速度高于递归)

    #region API 遍历文件夹及其子文件夹和子文件 #region 声明WIN32API函数以及结构 ************************************** [DllImpo ...

  4. C# 遍历文件夹下所有子文件夹中的文件,得到文件名

    假设a文件夹在F盘下,代码如下.将文件名输出到一个ListBox中using System.Data;using System.Drawing;using System.Linq;using Syst ...

  5. python 遍历文件夹 文件

    python 遍历文件夹 文件   import os import os.path rootdir = "d:\data" # 指明被遍历的文件夹 for parent,dirn ...

  6. C#遍历文件夹及文件

    背景: 想自己实现一个网盘系统,于是需要用到遍历文件(夹)操作. C#基本知识梳理: 1.如何获取指定目录包含的文件和子目录 (1). DirectoryInfo.GetFiles():获取目录中(不 ...

  7. Java学习随笔3:遍历文件夹及文件的读取和写入

    import java.io.File; /** * 遍历文件夹 */ public class ScannerFile { public static void main(String[] args ...

  8. java 遍历文件夹里的文件

    Java遍历文件夹的2种方法: A.不使用递归: import java.io.File; import java.util.LinkedList; public class FileSystem { ...

  9. python遍历文件夹下的文件

    在读文件的时候往往需要遍历文件夹,python的os.path包含了很多文件.文件夹操作的方法.下面列出: os.path.abspath(path) #返回绝对路径 os.path.basename ...

随机推荐

  1. Tensorflow设置显存自适应,显存比例

    1. 按比例 config = tf.ConfigProto() config.gpu_options.per_process_gpu_memory_fraction = 0.4 session = ...

  2. Axis 发布、调用WebService(转)

    一.JWS方法发布WebService 1.在官方网站下载axis的工程(这个等下就有用的)和源码.jar包等,下载地址是: http://www.apache.org/dyn/closer.cgi/ ...

  3. CSS知识点集锦

      CSS知识点集锦 CreateTime--2016年9月29日09:43:10Author:Marydon UpdateTime--2017年3月21日08:03:13 2.CSS样式优先级问题 ...

  4. 防止跨站请求伪造(CSRF)攻击 和 防重复提交 的方法的实现

    CSRF的概念可以参考:http://netsecurity.51cto.com/art/200812/102951.htm 本文介绍的是基于spring拦截器的Spring MVC实现 首先配置拦截 ...

  5. 用Beautiful Soup解析html源码

    #xiaodeng #python3 #用Beautiful Soup解析html源码 html_doc = """ <html> <head> ...

  6. Lambda表达式树

    1.常量表达式树 Func< + ); 使用表达式树的方式 ConstantExpression a = Expression.Constant(); ConstantExpression b ...

  7. data1是字符串?需要加上引号

    07-22 15:55:29.832: E/AndroidRuntime(23914): FATAL EXCEPTION: main 07-22 15:55:29.832: E/AndroidRunt ...

  8. Android开发环境——SDK相关内容汇总

     Android开发环境将分为SDK相关内容.Eclipse ADT相关内容.模拟器AVD相关内容.调试器DDMS相关内容.日志LogCat相关内容.连接驱动ADB相关内容.内存泄露检测工具MAT相关 ...

  9. java struts2入门学习---国际化

    一.国际化的概念 1.不同国家的人访问同一个网站,显示的语言不同. 2.对JSP页面进行国际化 属性(properties)文件命名规则:基名---语言--国家如, message_zh_CN.pro ...

  10. 搭建HBase+thrift+php环境

    http://www.beauty-soft.net/blog/ceiba/hadoop/2013-05-19/644.html http://www.360doc.com/content/11/07 ...