Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Создание папки вида: дата+время 
Author Message
Tol!k



PostPosted: Thu Nov 28, 2013 17:12    Post subject: Reply with quote

Morning и Evening без цифр?
Code:
@echo off &setlocal enableextensions

set "Folder=%%Year%%\TEST-%%N%%\%%Name%%"
set /a cntN=70
set "Names=Morning;Evening;Blah Blah Blah"

call :Year
for /l %%n in (1,1,%cntN%) do (
   set /a N=100%%n &call set N=%%N:~-2%%
   call :Name "%Names%"
   )
)
goto :eof

:Name
for /f "tokens=1,* delims=;" %%a in ("%~1") do (
   set "Name=%%~a"
   call 2>nul md "%Folder%"
   if not "%%~b"=="" call :Name "%%b"
)
goto :eof

:Year   ::   date DD.MM.YY
for /f "tokens=3 delims=-/." %%y in ("%date%") do set /a Year=20%%y
if %Year% GTR 200000 set /a Year=Year-200000
goto :eof
View user's profile Send private message


Powered by phpBB © 2001, 2005 phpBB Group