Batch Files?

August 26, 2010 at 17:46:07
Specs: Windows Vista, Intel Pentium Dual-Core
I have a folder full of .png files, and i was wondering how i would go about creating a code such as this pseudocode:
:start
find first png
create directory (pngname)
move png to directory
rename png in directory to icon.png
if number of pngs > 0
goto start
else
exit

Sorry if this is the wrong type of forum for this, i'm kind of a noob at batch scripting because i own a mac.


See More: Batch Files?

Report •

#1
August 26, 2010 at 19:26:53
"find first png"

first, as defined by what?


=====================================
Helping others achieve escape felicity

M2


Report •

#2
August 26, 2010 at 19:28:55
Sorry for not making it specific. I mean as the first png in alphamuneric order in the folder.

Report •

#3
August 27, 2010 at 08:57:06
@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b/on/a-d *.png') do (
md %%~Na
move /y %%a %%~Na\icon.png
)


=====================================
Helping others achieve escape felicity

M2


Report •
Related Solutions


Ask Question