Copy files edited after a specified date with xcopy

How to quickly copy in your prod website your last modifications ?

Windows client side

Let’s copy all files modified or created on or after 15/8 :

xcopy d:WebServerwwwrootespace-win.orgwww d:uploadme /D:8-15-2006 /S

/S to copy also subdirectories and /D allow to specify date (on Windows Server 2003, Enterprise Edition, english edition, this is M-D-Y format, I presume it’s D/M/Y on french versions)

If we wish exclude some files, for examples _notes Macromedia directories or UltraEdit auto .bak files : /EXCLUDE:.bak+_notes (we separe string to exclude by +)

Uploading

My favorite way is /dcc send SurfBoard, choose new folder d:uploadme, create a rar archive WITH THE DIRECTORY CONTENT, NOT THE DIRECTORY ITSELF (we don’t wish to add a new uploadme directory).

FreeBSD server side

cd /home/wwwroot/espace-win.org/www

unrar x /tmp/60710-f9nmwx2-uploadme.rar

That’s it 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.