How to? Use SYNC with a network drive

#1
I am using;
Code:
TCC  20.00.17   Windows Vista [Version 6.0.6002]
TCC Build 17   Windows Vista Build 6002  Service Pack 2
I have a network drive, drive O:
Code:
TCC:6532: 25 > net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK           O:        \\192.168.1.101\dosbox    Microsoft Windows Network
The command completed successfully.
I have full access to this drive, and the drive does exist;
Code:
TCC:6532: 27 > if exist o:\nul echo Yes
Yes
When I use the sync command,
Code:
which sync
sync is an internal command
as follows, it returns the following;
Code:
TCC:6532: 20 > sync /H /C /W /Z /S /G /V C:\Users\jlc\Documents\DOSBox O:\users\jlc\Documents\DOSBox
Usage : SYNC [/A:[[-][+]rhsdaecjot] /CDEGH /I"text" /JKLM /N[dejnst] /O:[-]adegnrstu /OPQR /Sn /TVWX] dir1 di
r2
When I use the sync command on a local drive (F:), the sync completes correctly;
Code:
TCC:6532: 26 > sync /H /C /W /Z /S /G /V C:\Users\jlc\Documents\DOSBox F:\users\jlc\Documents\DOSBox
SYNC: C:\Users\jlc\Documents\DOSBox => F:\users\jlc\Documents\DOSBox

     0 files copied
SYNC: F:\users\jlc\Documents\DOSBox => C:\Users\jlc\Documents\DOSBox

     0 files copied
I have been using the Microsoft Sync Toy and drive O: with no problems;

upload_2016-9-8_8-46-47.png

Why can I not sync to my O: drive using the SYNC command?

Joe
 

rconn

Administrator
Staff member
May 14, 2008
10,621
97
#2
I can't reproduce that here, unless either the source directory or the target directory doesn't exist. (SYNC will not try to create the target directory.)

If the directories exist, SYNC will display its "SYNC:..." message and begin copying files. Since you're not getting that, I suspect that your target doesn't exist or you don't have access privileges.
 
#3
Well, Microsoft SyncToy works, so I will continue to use it.
Code:
Preview of DOSBox Sync To Drive O (C:\Users\jlc\Documents\DOSBox\, O:\) in time 00:01:49:452.
SyncToy action was 'Synchronize'
Found 4 actions to perform.
Found 28,568 files that did not require action.
Analyzed 261.0 files per second.
Avoided copying 1,139,353,616 bytes in 28,568 files.
Saved approximately 00:37:58:00 by not copying any files.

SyncToy run of DOSBox Sync To Drive O (C:\Users\jlc\Documents\DOSBox\, O:\) completed at 9/9/2016 6:57:44 AM.

SyncToy action was 'Synchronize'.
SyncToy options were:
        Active for run all
        All files included
        No files excluded
        Do not check file contents
        Include read-only files
        Include hidden files
        Include system files
        Backup older files (send to Recycle Bin)
        All subfolders included
SyncToy run took 00:00:03:378.
Copied 135,710 bytes in 8 files in 00:00:03:378.
Bytes per second 40,174.7, files per second 2.4.
Avoided copying 1,139,353,616 bytes in 28,568 files that did not require action.
Saved approximately 07:52:40:07 by not copying all files.

The Sync operation completed successfully on folder pair 'DOSBox Sync To Drive O'
I run it from the TCC command line as;
Code:
SyncToyCmd.exe -R "DOSBox Sync To Drive O"
Joe
 
#4
I could not reproduce an error.
Code:
v:\> md \\lucky\v$\empty

v:\> dir /k /m /a:d e*
2016-05-14  22:00         <DIR>    empty

v:\> dir /k /m /a:d \\lucky\v$\e*
2016-09-09  10:15         <DIR>    empty

v:\> copy /s v:\empty \\lucky\v$\empty
V:\empty\a => \\lucky\v$\empty\a
V:\empty\foo\4console64.zip => \\lucky\v$\empty\foo\4console64.zip
V:\empty\foo\4utils64.zip => \\lucky\v$\empty\foo\4utils64.zip
V:\empty\foo\sysutils64.zip => \\lucky\v$\empty\foo\sysutils64.zip
V:\empty\x64\4autotray64.zip => \\lucky\v$\empty\x64\4autotray64.zip
V:\empty\x64\4console64.zip => \\lucky\v$\empty\x64\4console64.zip
V:\empty\x64\4utils64.zip => \\lucky\v$\empty\x64\4utils64.zip
V:\empty\x64\sysutils64.zip => \\lucky\v$\empty\x64\sysutils64.zip
     8 files copied

v:\> sync /H /C /W /Z /S /G /V v:\empty \\lucky\v$\empty
SYNC: V:\empty => \\lucky\v$\empty

     0 files copied
SYNC: \\lucky\v$\empty => V:\empty

     0 files copied

v:\> net use o: \\lucky\v$\empty
The command completed successfully.


v:\> sync /H /C /W /Z /S /G /V v:\empty o:\
SYNC: V:\empty => O:\

     0 files copied
SYNC: O:\ => V:\empty

     0 files copied