问题描述
- 请问诸位大神,如何用matlab实现不解压,直接复制压缩包中的文件?
-
请问诸位大神,如何用matlab实现不解压,直接复制压缩包中的文件?我已经实现了不解压,直接得到压缩包中的所有文件命,代码如下:% Create a Java file of the ZIP filename.
zipJavaFile = java.io.File('ResultLogs_10_20121012_83207.66.zip');
% Create a Java ZipFile and validate it.
zipFile = org.apache.tools.zip.ZipFile('ResultLogs_10_20121012_83207.66.zip')
% Extract the entries from the ZipFile.
entries = zipFile.getEntries% Initialize the file list.
filelist={};% Loop through the entries and add to the file list.
while entries.hasMoreElements
filelist = cat(1,filelist,char(entries.nextElement));
end
但是怎么复制出来啊?请指教!多谢!
解决方案
再循环里加上复制语句,例如:
copyfile('worker.bat','D:/')
时间: 2024-08-17 21:26:25