Execute Command - 'Move-Item' 'mv' is not recognized

Describe the issue/error/question

I’d like to move a file to a new location on my local file system but the Execute Command node complains.

I tried Move-Item, mv, and even cp. All produce the same error. I’m using mkdir in an earlier node to create a new folder based on the filename with success.

What is the error message (if any)?

ERROR: Command failed: Move-Item -Path R:\FILES\Old Bessie.eml -Destination R:\FILES\Old_Bessie\ ‘Move-Item’ is not recognized as an internal or external command, operable program or batch file.

Please share the workflow

Information on your n8n setup

  • n8n version: 0.153.0
  • Database you’re using (default: SQLite): default
  • Running n8n with the execution process [own(default), main]: default?
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Desktop app (Windows)

Hey @gary,

Have you tried using move? I suspect the execute command is using the cmd based terminal instead of powershell.

That works, thank you!

I also needed to quote both paths since there were spaces present.

1 Like