Moving Files Continuously with a Batch Script

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!

Answers


Maybe something like this?

@echo off
:LOOP
echo File Copy Started 
xcopy /s /Y "Source" "Destination" 
echo File Copy Completed
goto :LOOP

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


Need Your Help

__awaiter is not defined

node.js typescript visual-studio-code

I'm using typescript v 1.8.9 in VSCode, nodejs 5.9.1 i have my file app.ts that has these lines

KryoNet: Client disconnects immediately after connecting

java networking kryo kryonet

This seems to be a popular problem, but I'm still having trouble finding a solution even after spending a lot of time troubleshooting. I'm hoping there's an updated solution.