This is WAD. If you want to sync your hidden & system files too, use the
/A:... option.
I'm sorry, but I don't follow. I don't want to sync hidden/system files. In particular I don't want to delete such files in the target directory. Is there a way to do that? copy /a:-h /w still deletes hidden files.
C:\Junk>dir /a
Volume in drive C is OS Serial number is 1ce5:1203
Directory of C:\Junk\*
3/07/2010 12:39p DIR .
3/07/2010 12:39p DIR ..
0 bytes in 0 files and 2 dirs
201,156,771,840 bytes free
C:\Junk>mkdir S
C:\Junk>mkdir T
C:\Junk>T\
C:\Junk\T>touch /c Foo.txt & attrib +h Foo.txt
3/07/2010 12:40:39.945 C:\Junk\T\Foo.txt
___A________I -> _H_A________I C:\Junk\T\Foo.txt
C:\Junk\T>cd ..
C:\Junk>copy /w S\* T\
Deleting C:\Junk\T\Foo.txt
1 file deleted
TCC: (Sys) There are no more files.
"C:\Junk\S\*"
0 files copied
C:\Junk>dir /a T\*
Volume in drive C is OS Serial number is 1ce5:1203
Directory of C:\Junk\T\*
3/07/2010 12:40p DIR .
3/07/2010 12:40p DIR ..
0 bytes in 0 files and 2 dirs
201,156,771,840 bytes free
C:\Junk>T\
C:\Junk\T>touch /c Foo.txt & attrib +h Foo.txt
3/07/2010 12:41:15.749 C:\Junk\T\Foo.txt
___A________I -> _H_A________I C:\Junk\T\Foo.txt
C:\Junk\T>cd ..
C:\Junk>copy /a:-h /w S\* T\
Deleting C:\Junk\T\Foo.txt
1 file deleted
TCC: (Sys) There are no more files.
"C:\Junk\S\*"
0 files copied
C:\Junk>dir /a T\*
Volume in drive C is OS Serial number is 1ce5:1203
Directory of C:\Junk\T\*
3/07/2010 12:41p DIR .
3/07/2010 12:41p DIR ..
0 bytes in 0 files and 2 dirs
201,156,771,840 bytes free