file copy: but only files that has changed / are new (and more demands)

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
uffe_K
Junior Member
Junior Member
Posts: 49
Joined: 2004-03-06, 19:23 UTC
Location: Roskilde, DK

file copy: but only files that has changed / are new (and more demands)

Post by *uffe_K »

I want to copy everything from c:\mydata til d:\mydata, but only files that has changed / are new (including lots of subdirs and their content). Files in the destination which are no longer in the source should be deleted from the destination.

I have been using "synchronize dirs" for this, but haven't found a setting which deletes files in the destination.

Maybe there is a windows built-in cmd-prompt application for this?

Btw: I'm still on 9.51, but is of course going to upgrade if it helps.




Subject adjusted by moderator to fitting better to the thread content
User avatar
Ovg
Power Member
Power Member
Posts: 755
Joined: 2014-01-06, 16:26 UTC

Re: file copy

Post by *Ovg »

uffe_K wrote: 2023-04-05, 11:50 UTC Maybe there is a windows built-in cmd-prompt application for this?
Try

Code: Select all

Robocopy.exe c:\mydata d:\mydata /S /XO /MIR
If paths contains spaces, surround them (paths) with double quotes, eg:

Code: Select all

Robocopy.exe "c:\my data" d:\mydata /S /XO /MIR
Last edited by Ovg on 2023-04-05, 12:24 UTC, edited 1 time in total.
It's impossible to lead us astray for we don't care even to choose the way.
#259941, TC 11.01 x64, Windows 7 SP1 x64
sa16
Senior Member
Senior Member
Posts: 328
Joined: 2021-09-10, 07:15 UTC

Re: file copy

Post by *sa16 »

uffe_K
Use asymmetric mode:
Asymmetric If this option is checked, it is assumed that a copy of the left side should be created on the right side. Files which do not exist on the left side will be marked for deletion on the right side. This option is meant for backups.
uffe_K
Junior Member
Junior Member
Posts: 49
Joined: 2004-03-06, 19:23 UTC
Location: Roskilde, DK

Re: file copy

Post by *uffe_K »

Asymmetric is already checked, but it doesn't help.
uffe_K
Junior Member
Junior Member
Posts: 49
Joined: 2004-03-06, 19:23 UTC
Location: Roskilde, DK

Re: file copy

Post by *uffe_K »

Robocopy worked well. And I like the filename :-)
sa16
Senior Member
Senior Member
Posts: 328
Joined: 2021-09-10, 07:15 UTC

Re: file copy

Post by *sa16 »

Asymmetric is already checked, but it doesn't help.
The folder c:\mydata must be on the left and d:\mydata on the right. Is this factored in?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6973
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: file copy

Post by *Horst.Epp »

uffe_K wrote: 2023-04-05, 14:23 UTC Asymmetric is already checked, but it doesn't help.
This mode does exactly what you requested.
The source must be the right side, the target on the left.
Whats your problem with it ?
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9965
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: file copy

Post by *Dalai »

Horst.Epp wrote: 2023-04-05, 16:28 UTCThe source must be the right side, the target on the left.
As far as I understand it, it's the other way around, the source is on the left-hand side. Asymmetric mode makes the right-hand side equal to the left-hand side by copying from left to right and deleting single files on the right.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6973
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: file copy

Post by *Horst.Epp »

Dalai wrote: 2023-04-05, 18:15 UTC
Horst.Epp wrote: 2023-04-05, 16:28 UTCThe source must be the right side, the target on the left.
As far as I understand it, it's the other way around, the source is on the left-hand side. Asymmetric mode makes the right-hand side equal to the left-hand side by copying from left to right and deleting single files on the right.

Regards
Dalai
My mistake, you are right of course :wink:
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
uffe_K
Junior Member
Junior Member
Posts: 49
Joined: 2004-03-06, 19:23 UTC
Location: Roskilde, DK

Re: file copy: but only files that has changed / are new (and more demands)

Post by *uffe_K »

The issue is that files that should be deleted on the right side, do not get deleted.
And I have source = left, destination = right. Just as it should be.
A total of 2600 files, app. 100 should have been deleted on the right side, but it wasn't until I used robocopy, that it worked.

I'm also sure it used to work several versions of TC ago and I'm not sure when it stopped.

Right now source=destination, but I may be running some more experiments tomorrow.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: file copy: but only files that has changed / are new (and more demands)

Post by *Hacker »

Horst.Epp,
you are right of course
Or perhaps... left? :D

uffe_K,
A total of 2600 files, app. 100 should have been deleted on the right side, but it wasn't
Mind providing a screenshot of your Synchronize dirs window?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: file copy: but only files that has changed / are new (and more demands)

Post by *petermad »

2uffe_K
Do you have the Show button with the blue left-pointing arrow activated? Otherwise it won't work.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
sa16
Senior Member
Senior Member
Posts: 328
Joined: 2021-09-10, 07:15 UTC

Re: file copy: but only files that has changed / are new (and more demands)

Post by *sa16 »

uffe_K wrote: I'm also sure it used to work several versions of TC ago and I'm not sure when it stopped.
Save the correct synchronization settings using F2 in wincmd.ini and use the button/command with SYNCOPEN saved_sync_name (opens synchronize dirs with saved options). If the parameter begins with an equal sign "=", the comparison will start immediately.
uffe_K
Junior Member
Junior Member
Posts: 49
Joined: 2004-03-06, 19:23 UTC
Location: Roskilde, DK

Re: file copy: but only files that has changed / are new (and more demands)

Post by *uffe_K »

After having checked the blue arrow pointing to the left, it works.
Post Reply