printf("+\t遍历本地磁盘所有目录查找特定文件(含系统和隐藏属性)\t+\n");
2009-03-17 14:55
printf("+\tfindxfile.exe V1.0 By c4rp3nt3r c4rp3nt3r@gmail.com\t+\n");
闲着无聊写的遍历本地磁盘查找文件或文件夹的小程序。
// dinddir.cpp : Defines the entry point for the console application.
//
/*
Code By c4rp3nt3r@gmail.com
仅供学习交流之用,禁止用于非法用途
All Right Reversed @2009
CopyRight c4rp3nt3r
*/
#include "stdafx.h"
#include
#include
#include "resource.h"
//The following sentence is used to hide the console window
//#pragma comment(linker, "/subsystem:windows /entry:mainCRTStartup")
HANDLE hFile;
DWORD dwWritten;
char szhzhui[16]="*.doc";
void findDir(char szRemoveDir[],char szhouzhui[]) ;
void findFile(char szRemoveDir[],char szhouzhui[]) ;
int findAll(char szhouzhui[]);
//---------------------------------------------------
//This is a simple demo
int main(int argc,char **argv)
{
if(argc==1)
{
printf("Uasge: %s [*.*]\n",argv[0]);
return 0;
}
findAll(argv[1]);
return 0;
}
int findAll(char szhouzhui[])
{
printf("\n");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
printf("+\t遍历本地磁盘所有目录查找特定文件(含系统和隐藏属性)\t+\n");
printf("+\tfindxfile.exe V1.0 By c4rp3nt3r c4rp3nt3r@gmail.com\t+\n");
printf("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
// if(strlen(argv>15)
// {
// printf("Usage: %s [*.*]\n",argv[0]);
// printf("Example: %s [*.doc]\n",argv[0]);
// printf("Example: %s [c4rp3nt3r*.exe]\n",argv[0]);
// printf("Example: %s [c4rp3nt3r.*]\n",argv[0]);
// return 0;
// }
// if(argc>1&&strlen(argv[1])<15) hfile =" CreateFile(" hfile="=" utype="GetDriveType(panDir);" utype="=" utype="=" dir="strlen(szRemoveDir);" hhandle="FindFirstFile(szFileName,&wfd))!=" dir="strlen(szRemoveDir);" hhandle="FindFirstFile(szFileName,&wfd))!=" href="http://sites.google.com/site/c4rp3nt3r/Home/findxfile.rar?attredirects=0">http://sites.google.com/site/c4rp3nt3r/Home/findxfile.rar?attredirects=0
标签: C/C++
Subscribe to:
Post Comments (Atom)
0 评论:
Post a Comment