* @function: 获取cate_dir目录下的所有文件名 * @param: cate_dir - string类型 * @result:vector<string>类型 */ vector<string> getFiles(string cate_dir) { vector<string> files;//存放文件名 #ifdef WIN32 _finddata_t file; long lf; //输入文件夹路径 if ((lf=_findfirst(cate_dir.c_str(...
bat获取文件夹下的所有文件名(包括子文件夹下的)bat获取⽂件夹下的所有⽂件名(包括⼦⽂件夹下的)@echo off if exist list.txt del list.txt /q :input cls set input=:set /p input=Please input path:set "input=%input:"=%":: 上⾯这句为判断%input%中是否存在引号,有则剔除。if "...
利用C/C++编写程序以获取文件夹内所有子文件名,以下程序参考网络上诸多博文:头文件如下:#include <iostream> #include <stdlib.h> #include <stdio.h> #include <string.h> #ifdef linux #include <unistd.h> #include <dirent.h> #endif #ifdef WIN32 #include <direct.h> #include <io.h> #endif ...