• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

压缩文件解压器: 文件解压压缩_php

php 搞代码 7年前 (2018-06-21) 157次浏览 已收录 0个评论

调用了7z.exe。首先先搜索硬盘内的压缩文件,没有搜索到直接进行下载(有待添加)。其次,进行文件的压缩和解压…部分功能有待完善,代码没有任何技术含量,无非是保持对技术的热爱。
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <string.h>
#include <time.h>

http://www.gaodaima.com/50834.html压缩文件解压器: 文件解压压缩_php

const int LEN = 1024;
void ShowTime();
void Search();
void Compress();
void Decompress();
void Help();
int main()
{
int n = 0;
while(n!=5)
{
ShowTime();
printf(" ================================================= /n");
printf(" +++++++++++++++++++++++++++++++++++++++++++++++++ /n");
printf(" 1++++++++++++++++++++Search+++++++++++++++++++++1 /n");
printf(" 2+++++++++++++++++++Compress++++++++++++++++++++2 /n");
printf(" 3+++++++++++++++++++Decompress++++++++++++++++++3 /n");
printf(" 4+++++++++++++++++++++Help++++++++++++++++++++++4 /n");
printf(" 5+++++++++++++++++++++Exit++++++++++++++++++++++5 /n");
printf(" +++++++++++++++++++++++++++++++++++++++++++++++++ /n");
printf(" ================================================= /n");
printf("请选择操作类型:/n");
scanf("%d",&n);
switch(n)
{
case 1 : Search();break;
case 2 : Compress();break;
case 3 : Decompress();break;
case 4 : Help();break;
case 5 : return 0;break;
default : printf("输入错误/n");
}
}
return 0;
}
void ShowTime()
{
time_t now;
now = time(NULL);
printf(" %s", ctime(&now));
Sleep(1000);
//system("cls");
}
void DirectoryList(LPCSTR Path)
{
WIN32_FIND_DATA FindData;
HANDLE hError;
int FileCount = 0;
char FilePathName[LEN];
char FullPathName[LEN];
strcpy(FilePathName, Path);
strcat(FilePathName, "//*.*");
hError = FindFirstFile(FilePathName, &FindData);
if (hError == INVALID_HANDLE_VALUE)
{
printf("搜索失败!");
return;
}
while(::FindNextFile(hError, &FindData))
{
if (strcmp(FindData.cFileName, ".") == 0
strcmp(FindData.cFileName, "..") == 0 )
{
continue;
}
wsprintf(FullPathName, "%s//%s", Path,FindData.cFileName);
FileCount++;
printf("/n%d %s ", FileCount, FullPathName); 本文链接http://www.cxybl.com/html/wlbc/Php/20130626/38826.html

欢迎大家阅读《压缩文件解压器: 文件解压压缩_php,跪求各位点评,若觉得好的话请收藏本文,by 搞代码


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:压缩文件解压器: 文件解压压缩_php
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址