i want ot create a batch files but i have not much experience in this.. is anyone can help me? i want to create a batch file which is the main function is to move some .txt files from a folder (A) to another folder (B)?
but those .txt that going move to other file must base by a condition and the condition is when i trigger the batch file i need to know the trigger time or current time and compare the created date and time of .txt file and it must 3 minutes and 3 second ago..
base by this condition i only do the cut and paste from folder A to B
is it doable or anyone can provide me a link so i can refer to it..
thank you very much.
Yes this is do able. You need to look at robocopy and it's switches, this should see you right. Just type robocopy /? in cmd and make a note of all the switches you need as there are a lot! There will be other ways of doing this with the if statement but I'm not entirely sure about the timestamp issue. Maybe something like this:
if %Afiletimestamp% < %Bfiletimestamp% xcopy %Afilepath% %Bfilepath% /y
if%Afiletimestamp%<%Bfiletimestamp%xcopy%Afilepath %% Bfilepath%/ y
I'm not sure how to aquire the first 2 variables though, maybe someone else can add to this?