How to mass folder named according to some expression
문제
I want to create many folders whose names are like folder_x
where x is an even number less than 256. Is there a unix command/dos command or some shellscript that I can run to do this?
Or may be some free utility program that does mass folder creation?
I want to do this on Windows.
해결책
In bash and other compatible shells:
for i in $(seq 0 2 255) ; do mkdir "folder_$i" ; done
다른 팁
A simple bash script will do that.
for i in {0..256..2}
do
mkdir folder_$i
done
In a Windows cmd
prompt, this would be:
for /L %i in (0,2,255) do mkdir folder_%i
If you want to add this to a .bat file, remember it will need double %
:
for /L %%i in (0,2,255) do mkdir folder_%%i
제휴하지 않습니다 StackOverflow