PPowerHouseK wrote:
"When the function lists the files in a text, it lists alphabetically alternating the .map and .map.zip, beginning with the .map file. This may allow for counting every other one, or perhaps it would be more efficient to exclude the .zip file extension. This is where I am hung. "
See Input below*
C:\>type zip2.bat
@echo off
setLocal EnableDelayedExpansion
echo. > ziplist.txt
echo. > finalziplist.txt
findstr /v "zip" list2.txt
findstr /v "zip" list2.txt > ziplist.txt
set /a c=0
for /f "delims=" %%a in (ziplist.txt) do (
set /a c+=1
set map!c!=%%a
echo map!c! = %%a
echo map!c! = %%a >> finalziplist.txt
)
REM echo map!c! = !map1!
OUTPUT:
C:\>zip2.bat
house1.map
house2.map
house3.map
house4.map
map1 = house1.map
map2 = house2.map
map3 = house3.map
map4 = house4.map
C:\>type finalziplist.txt
map1 = house1.map
map2 = house2.map
map3 = house3.map
map4 = house4.map
C:\>
*Input:
C:\>type list2.txt
house1.map
house1.map.zip
house2.map
house2.map.zip
house3.map
house3.map.zip
house4.map
house4.map.zip
C:\>