I am trying to rename some folders with a batch-file, but everything I try gives me syntax errors. Here is what I have currently:
for /d %%a in (%cd%\*.*) do call :moveandrename %%~nxa %%a
.
.
.
:moveandrename
if exist %2\%1.pdf if exist %2\%1.xml move "%2" "%~dp0\export\_verarbeitet"
ren "%~dp0\export\_verarbeitet\%1" "%1_verarbeitet_%date%_%time%"
Any suggestions?
I found the bug...
adding "%time" to foldername caused syntax error, this is how it works