Hi All,
I'm looking for a batch file that will copy .txt files to the parent directory one day after they are created.
For example:
1st Jan, 2012 -
hello.txt is created in C:\Parent\Subdir\
2nd Jan, 2012
Batch file is run, hello.txt is copied to C:\Parent\
3rd Jan, 2012
No more files have been created, Batch file is run and does nothing, because hello.txt was created 2 days ago, not 1.
Is this possible?
Thanks for reading
Copy files that were created yesterday to parent directory
Moderator: DosItHelp
-
- Posts: 3
- Joined: 31 Jan 2012 09:07
Re: Copy files that were created yesterday to parent directo
What is the granularity of the check? 22 hours old enough? 23?
What happens when it's 25 hours old, but the batch file wasn't run. It won't be copied.
What happens when it's 25 hours old, but the batch file wasn't run. It won't be copied.
Re: Copy files that were created yesterday to parent directo
i am also searching for the answer....any luck??
Re: Copy files that were created yesterday to parent directo
This batch file is run once a day. Right?
And the hello.txt remains in the parent folder? That's easy.
And the hello.txt remains in the parent folder? That's easy.
Re: Copy files that were created yesterday to parent directo
Greetings parthe and welcome to the forum.
You may want to consider opening a new thread (subject) and post your
question and provide more details as to your particular problem. Use
foxidrive's reply as a guide.
The solution may be found using ROBOCOPY so including information about
your OS would also be helpful. Maybe you'll get lucky!
Best wishes!
You may want to consider opening a new thread (subject) and post your
question and provide more details as to your particular problem. Use
foxidrive's reply as a guide.
The solution may be found using ROBOCOPY so including information about
your OS would also be helpful. Maybe you'll get lucky!

Best wishes!
Re: Copy files that were created yesterday to parent directo
@foxidrive Oops, I didn't see your post. Didn't mean to 'step' on your reply.
Later.
Later.
Re: Copy files that were created yesterday to parent directo
No problemo Ocalabob.
We'll wait to see if the person replies or starts a new thread. Details, details, details, the Devil is in the details.
We'll wait to see if the person replies or starts a new thread. Details, details, details, the Devil is in the details.
