AX中API的简单调用

时间:2014-06-21 15:50:24   收藏:0   阅读:417

FilePath    folder = "E:\\NewFolder1";
    FilePath    filePath;
    container   fileInfo;
    int         fileHandle;
    FileName    _FileName;
    ;

    _FileName = folder;
    filePath = _FileName;

    if (substr(_FileName,strlen(_FileName)-1,1) == ‘\\‘)
    {
        _FileName = _FileName + ‘*.*‘;
    }
    else
    {
        _FileName = _FileName + ‘\\*.*‘;
        filePath = filePath + ‘\\‘;
    }

    fileInfo = winAPI::findFirstFile(_FileName);
    fileHandle = conpeek(fileInfo,1);

    _FileName = winapi::findNextFile(fileHandle);
   
    while (_FileName)
    {
        _FileName = winapi::findNextFile(fileHandle);

        if (_FileName != "")
             winAPI::deleteFile(filePath + _FileName);

    }
 
 
 
 

AX中API的简单调用,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!