Click here to Skip to main content
15,910,471 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all ..,

I have about 1000 directories on the source computer (pc1) in the following path :
D:\BackUp \1\2
Exp : D:\BackUp \1\2\001
D:\BackUp \1\2\002
D:\BackUp \1\2\003

each last folder contains the image file
I want to copy(update pc2) this directories to the another pc Automatically by flash memory

But

Previously once manually copy some directories from pc1 to the pc2
Because Each folder contains the image file , copy all the directories to pc2 act too much time
So I should just copy the directories on the pc2 That does not exist in the pc2
I have to repeat it every day and its very frustrating
How to do it .....
Thanks all
Posted
Updated 25-Jul-13 1:50am
v2
Comments
[no name] 25-Jul-13 6:51am    
"How to do it", well if it were me doing this everyday and getting frustrated, I would write a problem that copied the files from pc1 to pc2 so I could just run the program instead of doing it manually.
Samresh.ss 25-Jul-13 7:56am    
You can write a program that iterates through the subdirectories and copy it to pc2. On pc1 you can map a drive to pc2. That way you can use it, as you use your file system. If there are directories withing sub directories you can write a recursive program to achieve so.
amirpooya 25-Jul-13 14:36pm    
Please give a sample cod
Joezer BH 25-Jul-13 8:01am    
* What seems to be the problem then?
* Also - I don't understand the title "select customer directories" what does that mean?
amirpooya 25-Jul-13 14:38pm    
Sorry revised :
custom directories

Assuming that you are using a Windows platform, you could just write a cmd file (aka batch file) to run various XCOPY commands http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/xcopy.mspx?mfr=true[^]
e.g.
xcopy \\pc1\d$\Backup\*.* \\pc2\d$\Backup /E /I /R /Y /M
(substitute \\pc1\d$ and \\pc2\d$ for the appropriate computer and share names)

The important flag is the "/m" - essentially this ensures that only files that have changed since they were last copied are included in this copy ... in other words you will only need to copy the image across once.
If you do use this technique then I would suggest "seeding" the folder first by doing a straight forward copy of everything.

You can schedule this to run at a specific time everyday or just double-click the cmd file when you need it.
 
Share this answer
 
Comments
amirpooya 25-Jul-13 14:53pm    
tanks this is a best Solution
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900