2

I'm trying to create a .bat file to continuously move new images to a folder to archive them. So far I have figured out how to get the images to move between folders without prompting to be overwritten but getting the action to loop has been tricky for me.

Script to move files between folders

@echo off
echo File Copy Started 
xcopy /s /Y "Source" "Destination" 
echo File Copy Completed 
pause 

Does anyone have any ideas to get this script to loop continuously? I was thinking of using something such as

IF EXIST .jpeg (an image)
then run the script to move the files 

ELSE 
Pause 

?? I'm Just not sure how to start writing this. Any feed back would be great. Thanks!

Community
  • 1
  • 1
Nightzrain
  • 83
  • 1
  • 10
  • 1
    Take a look [here](http://stackoverflow.com/q/1672338/269126), might give you some ideas and provide part of the solution. – Lumi Dec 06 '12 at 16:14

2 Answers2

1

Maybe something like this?

@echo off
:LOOP
echo File Copy Started 
xcopy /s /Y "Source" "Destination" 
echo File Copy Completed
goto :LOOP
Bali C
  • 28,049
  • 34
  • 109
  • 147
0

Use the AT command or the Windows Scheduler to run the task on a continuous basis