Created
December 12, 2020 15:08
-
-
Save n005/fc26a070d1e718d901208ce87371d96c to your computer and use it in GitHub Desktop.
Convert MM/dd/yyyy;mm:hh:ss;data;data to dd/MM/yyyy;mm:hh:ss;data;data;dd/MM/yyyy mm:hh:ss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
setlocal EnableDelayedExpansion | |
(FOR /F "usebackq tokens=1-2* delims=;" %%a IN (`TYPE "terrase.txt"`) DO (ECHO %%~a))>OUTPUT1 | |
(FOR /F "usebackq tokens=1-2* delims=/" %%a IN (`TYPE "OUTPUT1"`) DO (ECHO %%~b/%%~a/%%~c))>OUTPUT2 | |
del OUTPUT1 | |
(FOR /F "usebackq tokens=1-2* delims=;" %%a IN (`TYPE "terrase.txt"`) DO (ECHO %%~b;%%~c))>TEMP | |
< TEMP ( | |
for /F "delims=" %%a in (OUTPUT2) do ( | |
set /P line2= | |
echo %%a;!line2! | |
) | |
) > OUTPUT3 | |
del TEMP | |
del OUTPUT2 | |
(FOR /F "usebackq tokens=1-2* delims=;" %%a IN (`TYPE "OUTPUT3"`) DO (ECHO %%~a;%%~b;%%~c;%%~a %%~b))>"Traitement/Test.txt" | |
del OUTPUT3 | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment