Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Can XCOPY do this for me?
Name: taylormade Date: November 7, 2008 at 04:48:13 Pacific OS: Win2003 Server CPU/Ram: 4gig
Comment:
I have an xcopy batch file that has these flags set: xcopy /c /d /h /s /i /r /y "d:\etalus" "d:\copyetalus" >> "d:\xcopylog.txt" this configuration seems to update changed or newer files that exist on the desitination side. But it does not remove files or folders on the destination side, if they no longer reside on the origination side. Is there a way I can 1) make xcopy do that, or 2) do it another way?
Name: IVO Date: November 7, 2008 at 05:53:26 Pacific
Reply:
No with just the XCOPY command that is aimed to copy not delete files, but adding the following statements to your batch.
Please, after testing and when you are sure all worked fine, remove the ECHO command in front of del and RD to really enable the deleting process. pushd D:\copyetalus for %%j in (*) do if not exist "D:\etalus\%%j" ECHO DEL "%%j" for /D %%j in (*) do if not exist "D:\etalus\%%j" ECHO RD /S /Q "%%j" popd
0
Response Number 2
Name: taylormade Date: November 7, 2008 at 06:52:34 Pacific
Reply:
I just added some fake files to D:\copyetalus and ran the code. They did not get removed. Can yo confirm for me that your code will Remove from D:\copyetalus all of the files and folders that ARE NOT in D:\etalus. NOTE: D:\etalus is the BIBLE and cannot be changed. Thanks
0
Response Number 3
Name: taylormade Date: November 7, 2008 at 08:32:38 Pacific
Reply:
hold the fort...I think things are good.. thanks
0
Response Number 4
Name: IVO Date: November 7, 2008 at 08:34:49 Pacific
Reply:
Did you carefully read my post?
In the second paragraph, beginning with Please, after testing and , I stated you must remove the ECHO in front of DEL and RD to activate the deletion. That is for your safety.
YES, the script, if modified, does what you asked.
0
Response Number 5
Name: taylormade Date: November 7, 2008 at 17:16:08 Pacific
Reply:
yes..as I said..Things Are Good. Thanks for your time and talent
Summary: i have developed a visual basic.net application now i want that when i run my application it looks the entire screen so that user must responds to it...like the way logoff in windows.... how can i do ...
Summary: A certain site has this script : <script language="JavaScript"> var forumid=3; var forum_name="Halflife & Counter-Strike"; var Description="זה הזמן להצטרף לשחקני CS הישראלים!"; var sticky_message_...
Summary: hello i am running a network at school.i need to log all the computers (after using net view) to a notepad. can you do this for me using a batch file? ...