Batch - die 2. neusten Datei auslesen
Hi Biber, Hi bastla und natürlich auch an alle anderen Bastler,
ich sitze wieder mal, vor meinem Projektalptraum und blick langsam gar nichts mehr.
Und zwar soll per Batch aus einem Verzeichnis von der 2. neusten Datei der Dateiname ausgelesen werden. Hier mal ein kl. Muster des Verzeichnisinhaltes:
Mein Ansatz geht ganz klar Richtung Schleife. Anzeigen würde ich Dateien in Kurzschreibform per dir /b. Jedoch nun geht es los, wie sortiere ich die Files - Die neusten Files am Anfang oder am Ende. Denn eine Schleife wirklich zu unterbrechen nach x Durchläufe gibt es hier ja nicht.
Gruß
Dani
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030801.log
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030802.log
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030803.log
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030804.log
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030805.log
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030806.log
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030807.log
D:\Perl\bin\perl.exe awstats.pl config=netfusionkc.com -update -logfile=D:\Domains\netfusionkc.com\logs\W3SVC6238\ ex030808.log
Gruß
Dani
Please also mark the comments that contributed to the solution of the article
Content-Key: 88183
Url: https://administrator.de/contentid/88183
Printed on: April 19, 2024 at 11:04 o'clock
4 Comments
Latest comment