Count moved and unmoved files with batch file

May 4, 2009 at 09:16:29
Specs: Windows XP

I am putting together a batch file to allow the user to move certain file types (.RCS) from one folder to another. I am using the following code to do this:

@echo off

if not exist "C:\Temp Remote Files\nul" mkdir "C:\Temp Remote Files"


set /p userinp=Type a number to represent your choice ie number (1-4):
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto 1
if "%userinp%"=="2" goto 2
if "%userinp%"=="3" goto 3
if "%userinp%"=="4" goto 4

if not exist move "C:\Temp Remote Files\*.RCS" "C:\Program Files\Remote\Archive\"
goto start

:2 etc

What I would like to do is tell the user how many files were moved from "C:\Temp Remote Files" and how many were not because they already exist in "C:\Program Files\Remote\Archive\"

Any help in this capacity would be welcomed.


See More: Count moved and unmoved files with batch file

Report •

May 4, 2009 at 09:58:42
"if not exist move "

Are we missing something here?

If at first you don't succeed, you're about average.


Report •
Related Solutions

Ask Question