how to calculate name, date and time of zip file in winhex? - date

how do I calculate the time date and name of a zip file?
I have tried the zip structure but the name of the file is of inside the zip file.

For knowing and browsing the zip structure, google for "appnote.txt".

Related

Batch file to move a download to new folder

I used the tampermonkey extension to download an excel file every time I visit a certain URL. I want to write a batch file that will visit that URL everyday, cause the file to download, and then move that downloaded file into a new folder.
I know how to get to the url and initiate the download with a batch script
The downloaded filename is in the format "websitename_DDMonYYY," except if the date is 1 digit the leading zero is removed.
For example, today's downloaded file would be "websitename_8Feb2023"
How can I write a script that will match the downloaded file name to today's date, so that I can then move it to a new folder?
I've been trying to use the %date:~#,#% syntax to extract the day, year, and month, but I need help removing the leading zero in the date, converting the month number into a 3 letter code, and then concatenating all of these into a single string.
Thank you!

How to get file name which extension is .txt at given path in ps1

I want to get one by on file name which extension is .txt at any given location in ps1. for example my file location is C:\ProjFile and here I have multiple .txt file and I want to get one by one file name

How to convert group of .dat file has 16bit integer data to group of .txt file?

I have a group of .dat files I need to convert to .txt files. I have a directory called "data" that has "210" files (0.dat, 1.dat, ......210.dat), I want to convert these .dat files to .txt files (0.txt, 1.txt ......210.txt), the data type is 16bit integer.
Ideally you are supposed to try a few steps before coming here asking for a solution. Since this is your first post, I'll give you a few pointers. Next time please Google a few solutions. Try them. Post your code/error if you have any issues to receive help.
From the directory, Load all the contents of the folder using,
files = dir('*.dat');
Add a FOR loop to read each dat file one by one.
fileID = fopen('XXXX.dat');
OneByte = fread(fileID,'*uint16');
Then once the file is loaded you can convert it into .txt file.

Make a copy of the files in a directory but save them as a different file type

Is it possible to list all of the files in a directory of a certain file type, and then save them in the same directory but as a separate file type using MatLab?
In my case, I have 144 files saved as in a .fig format, but I would like to copy them as a .tif format so that I don't have to go and change each file manually.
I know I can list all the files in my directory using the dir function and I guess I could simply run for loop with i=1:length(dir) but I don't know how to isolate the files of a specific file type. I don't see filetype as a field name on the mathworks website for dir.
Thanks for any suggestions.
To list only files of type .fig:
files = dir('*.fig');
You can then loop over the names:
for k = 1:numel(files)
filename = files(k).name;
% do something with filename
end

Extracting specific file from zip in matlab

Currently I have a zipfile containing several thousand .xml files, extracted the folder is 1.5gb in size.
I have a function that matches data with specific files inside this zip file. I then want to read this specific file and extract additional data.
My question:
Is there any way to extract these specific files from the archive without unzipping the entire archive?
The built in unzip.m function can only be used to unzip the entire file so it won't work so I am thinking I have to use the COM interface or some other approach.
Matlab version: R2013a
While searching for solutions I found this:Read the data of CSV file inside Zip File without extracting the contents in Matlab
But I can't get the code in the answer to work for my situation
Edit:
Credit to Hoki and Intelk
zipFilename = 'HMDB.zip';
zipJavaFile = java.io.File(zipFilename);
zipFile=org.apache.tools.zip.ZipFile(zipJavaFile);
entries=zipFile.getEntries;
cnt=1;
while entries.hasMoreElements
tempObj=entries.nextElement;
file{cnt,1}=tempObj.getName.toCharArray';
cnt=cnt+1;
end
ind=regexp(file,'$*.xml$');
ind=find(~cellfun(#isempty,ind));
file=file(ind);
file = cellfun(#(x) fullfile('.',x),file,'UniformOutput',false);
And not forgetting the
zipFile.close