You are not logged in.
Pages: 1
Hi sorry my english.
I have some .mkv film in D:\cdd i write script to sort him to folder.
for %i in (*mkv) do md "%~ni"
for %i in (*mkv) do move "%i" "%~ni"
This is code in bat file. Bat file is in D:\cdd
Bat file not working.
When i run win+r type cmd to cmd type
D:
cd cdd
for %i in (*mkv) do md "%~ni"
for %i in (*mkv) do move "%i" "%~ni"
Code working
Can you help me what i doing bad in batfile?
Offline
If you took a moment to read the help output of 'For /?' you would see that for variables need to be % escaped in batch files - So %%i instead of %i
See the pages relating to the For command on this forum for more information.
Offline
Pages: 1