摘要: 这个是在DOS下文件名不能超过8个字符,后缀也就是扩展名不超过3个字符的文件。windows下已突破8.3文件名的限制,可以是255个字符了。 阅读全文
posted @ 2012-02-24 16:59 戴墨镜的老猫 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 以下程序只能在Windows下运行,完全按照c语言编写。但是添加了windows.h库。以下程序在Visual C++ 2008下编译通过。#undef UNICODE // 如果你不知道什么意思,请不要修改#define MAX_RESULT 256#include <stdio.h>#include <stdlib.h>#include <Windows.h>char** EnumFiles(const char *directory, int *count){WIN32_FIND_DATA FindFileData;HANDLE hFind;char 阅读全文
posted @ 2012-02-24 15:09 戴墨镜的老猫 阅读(1040) 评论(0) 推荐(0) 编辑
摘要: C++获取一个文件夹下的所有文件名window + vs2005:#ifndef FUNC_H#define FUNC_H#include <string>#include <vector>#include <fstream>#include <windows.h>using namespace std;vector<string> & get_filelist(char *foldname){vector<string> flist;HANDLE file;WIN32_FIND_DATA fileData;cha 阅读全文
posted @ 2012-02-24 15:07 戴墨镜的老猫 阅读(5873) 评论(0) 推荐(0) 编辑
摘要: 开始--运行 然后在运行框中输入“cmd”再确定,在出现的DOS窗口中进入那些文件所在的目录,再输入“ dir > wjm.txt”按回车键。打开Excel,导入文本文件“wjm.txt”,那些文件名就都到EXCEL里了。 下面的操作时进入DOS窗口后的操作。左右输入的wjm.txt是用于存储文件中的文件名用的。 阅读全文
posted @ 2012-02-24 13:09 戴墨镜的老猫 阅读(1771) 评论(0) 推荐(0) 编辑