Evan L
Evan L

Reputation: 3

VBScript to move files gets error "Expected statement"

I am writing a script to move files between directories. I copied and edited this script from another post:

MOVE C:\Users\evan\Downloads\*.mp3 C:\Users\evan\Music

and I run it from the CLI using

cscript test.vbs

I would expect it to work, but I get this message:

C:\Users\evan\test.vbs<1,8> Microsoft VBScript compiliation error: Expaected statement

Can someone please explain what this error message means or point out my mistake that causes the error message? Sorry for being such a noob.

Upvotes: 0

Views: 165

Answers (1)

Dark Falcon
Dark Falcon

Reputation: 44201

That looks like a batch file, but you are trying to invoke it as a VBScript. Rename your file to .bat and invoke it directly.

Upvotes: 2

Related Questions