Solved

Move files based on modified date

Posted on 2016-11-09
3
17 Views
Last Modified: 2016-11-28
We have a user that normally sends an email with a list of files that were created on the same day.  We then go in, and move them from one server to a location the user has access to.  

Is there a way to do this in a batch file so the user can just run it on the day they need the files, and it automatically moves the files from that day?  

Basically want to take myself out as being the middle man, in case I am not available some day.
0
Comment
Question by:MRGCD-IS
  • 2
3 Comments
 
LVL 4

Assisted Solution

by:AnthonyHamon
AnthonyHamon earned 100 total points (awarded by participants)
Comment Utility
You can use robocopy as follows:

robocopy D:\source D:\destination /maxage:1

This will copy any file in D:\source modified in the last 24 hours to D:\destination
0
 
LVL 23

Accepted Solution

by:
NVIT earned 400 total points (awarded by participants)
Comment Utility
Since you want to move the files, you need the MOVE switch.

robocopy "D:\source folder" "D:\destination folder" "*.*" /maxage:1 /mov

Open in new window


If you'd like full automation, i.e. without the user running it, you can put the line in a scheduled task. This would be useful in case the user forgets to manually run it.
0
 
LVL 23

Expert Comment

by:NVIT
Comment Utility
Award split accordingly.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now