how to alphabeticaly sort files in bat file?

  • Thread starter Thread starter ILiya
  • Start date Start date
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.
 
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?
 
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.
 
=============
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.
 
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.
 
Back
Top