how to alphabeticaly sort files in bat file?

I

ILiya

I have file archives that need to be extracted in sequence based on the archive names.
To do this, I think I need to iterate through all files in archives directory, pickup those falling into archives pattern (like "WeeklyUpdates????????.zip", sort them alphabeticaly (probably in a separate file) and then iterate through the file feeding them to unzip utility. But I have no idea how to implement this in bat file.
Thanks in advance.
 
P

Pegasus \(MVP\)

I have file archives that need to be extracted in sequence based on the
archive names.
To do this, I think I need to iterate through all files in archives
directory, pickup those falling into archives pattern (like
"WeeklyUpdates????????.zip", sort them alphabeticaly (probably in a separate
file) and then iterate through the file feeding them to unzip utility. But I
have no idea how to implement this in bat file.
Thanks in advance.

=============

This may need a little more thinking about, e.g.
- Why would you need to sort the files before unzipping them?
- Where should the unzipped files go?
 
H

HeyBub

ILiya said:
I have file archives that need to be extracted in sequence based on
the archive names.
To do this, I think I need to iterate through all files in archives
directory, pickup those falling into archives pattern (like
"WeeklyUpdates????????.zip", sort them alphabeticaly (probably in a
separate file) and then iterate through the file feeding them to
unzip utility. But I have no idea how to implement this in bat file.
Thanks in advance.

At the command prompt, type "SORT /?" for instructions.
 
I

ILiya

=============
This may need a little more thinking about, e.g.
- Why would you need to sort the files before unzipping them?
These archives contain antivirus updates with the parttern part ???????? actually representing YYYYMMDD date stamp.
As software provider stipulated, the archives may contain duplicate files in which case the latter archive should take precedence.
Hope for further help.
 
P

Pegasus \(MVP\)

ILiya said:
=============

This may need a little more thinking about, e.g.
- Why would you need to sort the files before unzipping them?
These archives contain antivirus updates with the parttern part ????????
actually representing YYYYMMDD date stamp.
As software provider stipulated, the archives may contain duplicate files in
which case the latter archive should take precedence.
Hope for further help.

============

Mhm. As far as I remember, there were two questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top