zoukankan      html  css  js  c++  java
  • Find out specified the folder for all the files

    static void Jimmy_FindoutFolderSubFiles(Args _args)
    {
    /*****
    The functions is used to find out specified the folder for all the files
    Worte by Jimmy on Nov. 25th 2010
    */
        System.IO.DirectoryInfo DirInfo;
        System.IO.FileInfo[]    Fileinfos;
        System.IO.FileInfo      FI;
        FilePath                FilePath;
        int                     i,Length,m;
        Test                    test;
        name                    name;
    ;
        filePath = WinAPI::browseForPath(infolog.hWnd(),"Please select one of folder path...");//folder path dialog
    
        if(!filePath)
            return ;
        DirInfo  = new System.IO.DirectoryInfo(FilePath);
        Fileinfos= DirInfo.GetFiles();
        Length   = Fileinfos.get_Length();
    
        if(Length)
            delete_from test;
        for (i = 0; i < Length; i++)
        {
            FI          = Fileinfos.GetValue(i);
            //info(FI.ToString());
            name        = FI.get_FullName();
            test.Name   = name;
            test.ItemId = global::StrDelete(fi.get_Name(),'.JPG');
    
            if(test.ItemId != 'Thumbs.db')
            {
                if(InventTable::find(test.ItemId))
                {
                    m++;
                    test.IsPic = Noyes::Yes;
                    test.insert();
                }
                else
                    info(test.ItemId);
            }
        }
        info(strfmt("Total import picture %1 per on the %2!",m,filePath));
    }
    
    
  • 相关阅读:
    算法-在字符串中删除特定的字符或字符串
    Linux 下的7种文件类型
    TCP/IP协议、三次握手、四次挥手
    8、VUE自定义组件
    7、VUE事件
    6、VUE指令
    Redis高级功能-1、高并发基本概述
    5、插值
    4、VUE生命周期
    3、Vue实例的属性
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1887263.html
Copyright © 2011-2022 走看看