I have a small but interesting task here. I have a list of files with the same extension, for example.
a.abc b.abc c.abc
I want here to first create folders named a
, b
, c
... for each .abc
file, and then move them to my folder.
I managed to take the first step quite simply using the line cmd find ... | sed ... | xargs mkdir...
find ... | sed ... | xargs mkdir...
find ... | sed ... | xargs mkdir...
but when I tried to use a similar cmd to move each file to its own folder, I could not find the answer.
I donโt own CMD here, and I have very fuzzy memory, that in find
cmd I can use some backlink to reuse the file / directory name, donโt I remember it wrong? Searched for it, but did not find a good link.
Can someone help me fill in cmd here?
Thanks.
Derek source share