Batch Scripting - If ELSE Statements - TechRepublic
General discussion
June 24, 2010 at 09:46 AM
jhallstrom

Batch Scripting – If ELSE Statements

by jhallstrom . Updated 16 years ago

Hello,

I am trying to create a script that will move certain file types from an FTP folder and move them to a working directory.

Here is what I have – will this work?

CD C:\incoming\TESTFTP

IF EXIST *artrm.* (Copy *artrm.* C:\work)
ELSE (ECHO NO FILES TO MOVE)

I am trying to move all files named artrm.*

What am I missing or is there a better way to do this?

Thanks

This discussion is locked

All Comments