create same folder using batch file

October 20, 2011 at 03:58:38
Specs: Windows XP
i want to create a batch file which wil copy data from one computer to another and the data wil include the directories and sub directories. now the problem is i am new in scripting so don't have much idea about it. i have a folder name 'Archive' and with in this system automatically creates folders yearwise lets say ''2009',2010','2011' and with in these folder system creates each month folder according which month going on like 'October' and then in date month it wil create folders datewise like each day a new folder wil created acc to date and in that date folder my data get saved. now i want the whole path e.g F:\ Archive\2011\october\20-10-2011\*.* to copied from one machine to other machine in network with same path and drive letter everyday at midnight

See More: create same folder using batch file

October 20, 2011 at 13:37:25
You need to look at using robocopy. You can download the toolkit that contains the robocopy executable here:

Once you get it downloaded and installed let me know and we can go from there.

Report •

October 20, 2011 at 22:14:37
is thr any other way to do this like writing down any script or something..bcz its office server nd i don't 9 if i cud install it over thr..they hv asked me to write some script which they can run directly over thr nd cn schedule it at some fixed time for every day.

Report •

October 20, 2011 at 23:29:39
hey jowah for testing sake i have installed that software on my tell me what to do next now...nd also plz let me 9 if thr is any other sol of doing this i mean without installing the software at server.....

Report •

Related Solutions

October 21, 2011 at 09:39:39
You don't need to install robocopy. All you need to do is place the robocopy.exe executable in C:\Windows\System32 on the server that the task will live on.

You can put this into a .bat file:

@echo off


robocopy F:\archive\ \\destination_server\c$\archive *.* /R:10 /W:60 /E /ZB /copyall


Now just create a task on that machine that runs at midnight everynight and calls the batch file above. You will need to customize the content for your environment though.

Report •

Ask Question