Forum Announcement

Welcome to the new CNET Forums! Please don't panic. You are not in the Twilight Zone, you are experiencing the new CNET forums platform! Please click here to read the details. Thanks!!

Web Hosting, Design, & Coding

General discussion

script to copy a folder..

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

hi

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?

regards

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.

Kees

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
icon
Computer Help 47,885 discussions
icon
Computer Newbies 10,322 discussions
icon
iPhones, iPods, & iPads 3,188 discussions
icon
Security 30,333 discussions
icon
TVs & Home Theaters 20,177 discussions
icon
HDTV Picture Setting 1,932 discussions
icon
Phones 15,713 discussions
icon
Windows 7 6,210 discussions
icon
Networking & Wireless 14,510 discussions

Tech Tip

Tired of your tricky Wi-Fi password?

Stop trying to memorize a complicated sequence of numbers and letters. Learn how to change the default password.