Bones
Bones

Reputation: 9

'mv' is not recognized as an internal or external command

Why does this code work, only when I replace the mv with move?

forfiless /c "cmd /c mv @FILE @FNAME_changed.@EXT"

Generally the short form mv works just well, but when I use it with the forfiles command it says:

'mv' is not recognized as an internal or external command, operable program or batch file. 

Upvotes: 0

Views: 426

Answers (1)

Lajos Arpad
Lajos Arpad

Reputation: 76482

move is a recognized command in Windows and this is why it works. mv is not a recognized command in forfiles. mv is a recognized and known Linux command for moving files and it's also known in Powershell, so you either ran it directly in Powershell (valid) or ssh-d to a Linux server and executed mv (valid) or something else, but when you try to do it in forfiles, then it's invalid.

Upvotes: 1

Related Questions