Skip to content

Instantly share code, notes, and snippets.

@hjnowakowski
Created January 16, 2018 20:16
Show Gist options
  • Save hjnowakowski/fc082ac1fe614aaac9ec01f738e04357 to your computer and use it in GitHub Desktop.
Save hjnowakowski/fc082ac1fe614aaac9ec01f738e04357 to your computer and use it in GitHub Desktop.
Batch66
@echo off
ren %1\*.txt *.txt2
if "%~2"=="" goto end
if %2==c (goto if) else (goto end)
:if
set /p kat="podaj katalog: "
set /p dat="podaj jak stare: "
if not exist %1\%kat% mkdir %1\%kat%
forfiles /p %1 /m *.txt2 /c "cmd /c copy @path %kat%\@file" /d -%dat%
:end
echo Zakonczono
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment