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. ScrollView嵌套EditText联带滑动的解决的方法

    本篇文章的相关内容需结合上文:从ScrollView嵌套EditText的滑动事件冲突分析触摸事件的分发机制以及TextView的简要实现和冲突的解决的方法 在说完了怎样解决ScrollView嵌套E ...

  2. 下拉列表框select

      下拉列表框select CreateTime--2017年5月15日15:39:24 Author:Marydon 三.下拉列表框 (一)语法 <select></select& ...

  3. UML - EA 序列图

    序列图中的 Fragment 的类型(Loop.Opt.Par和Alt) (还有: ) 序列图主要用于展示对象之间交互的顺序. 序列图将交互关系表示为一个二维图.纵向是时间轴,时间沿竖线向下延伸.横向 ...

  4. Cocos2d-x执行时错误:Cocos2d: Get data from file(xxx.xxx) failed!

    取资源图片时遇到执行时错误: Cocos2d: Get data from file(xxx/xxx.xxx) failed! 原因是我加入资源目录的方式不正确,例如以下图,我选择的是在Resourc ...

  5. ios中键盘处理适合ipad 和iphone

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWasShown:) name:UI ...

  6. iOS 常用的几个math函数

    1.取整数 double ceil (double); 取上整 double floor (double); 取下整 2.绝对值 double fabs (double);求绝对值 double ca ...

  7. JavaScript Boolean Object 逻辑

    Create a Boolean Object The Boolean object represents two values: "true" or "false&qu ...

  8. Lua协程学习

    按照书上码了下,但运行有问题,暂时不知道原因: function send (x) coroutine.yield(x) end function producer() return coroutin ...

  9. ng-file-upload结合springMVC使用

    引入angular和ng-file-upload. 前端代码 Upload.upload({ url: 'upload', fields: {'username': 'zouroto'}, // ad ...

  10. iphone 恢复出厂设置方法

    1.下载安装并打开itunes. 2.让手机进入恢复模式: 一.先长按住电源键,出现关机选项时,请滑动关机: 二.随后再按电源键开机,屏幕会出现苹果标志,不要松开电源键: 三.接着再按住主屏 Home ...