Web Hosting, Design, & Coding forum

General discussion

script to copy a folder..

by amirtanoli / July 14, 2009 12:16 AM PDT


i want to create a batch file that will run every sunday and copy all the folders created on previous day (i-e saturday) from Network drive "A" to another Network drive "B".

any clue how to do it?


Post a reply
Discussion is locked
You are posting a reply to: script to copy a folder..
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: script to copy a folder..
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: script
by Kees Bakker / July 14, 2009 12:24 AM PDT

Write a vbscript using the filesystem object. Not too difficult.


Collapse -
Some info
by FrankQC / July 14, 2009 10:00 PM PDT

Google something called 'xcopy'

I'm not exactly sure how to create an xcopy got a network drive, only for local/external hard drives. I've seen network batchfiles and they have additional lines on top to specify the location of it.

So, keeping that in mind, research xcopy and robocopy.

Now, if I wanted to do something on a scheduled event I'd use 'cron' but I'm not sure if Windows has that exact thing. So, you'll have to research for some utilities that will do it for you (unless Windows has a folder that is configurable). Who knows, you could probably do a script/program that has a timer, and when that timer reaches 0, it executes an operation that copies/moves the files around. Then goes back up to X amount of time.

Just my 2 cents.

Popular Forums
Computer Help 49,613 discussions
Computer Newbies 10,349 discussions
Laptops 19,436 discussions
Security 30,426 discussions
TVs & Home Theaters 20,308 discussions
Windows 10 360 discussions
Phones 15,802 discussions
Windows 7 7,351 discussions
Networking & Wireless 14,641 discussions


Having Wi-Fi troubles?

From the garage to the basement, we blanketed every square inch of the CNET Smart Home with fast, reliable Wi-Fi.