I would like to synchronize several files that are periodically updated to the same folder.
Sources:
D:\Development\RootFolder\FolderA\bin\Debug\PackageA.X.Y.X.nupkg
D:\Development\RootFolder\FolderB\bin\Debug\PackageB.X.Y.X.nupkg
...
D:\Development\RootFolder\FolderN\bin\Debug\PackageN.X.Y.X.nupkg
Destination:
D:\Nuget-Local-Cache
Basically, this is my scenario.
What would be the most appropriate way to make the sync?
I tried to put each route as I describe above, and repeating the destination, he gives me a warning.
It synchronizes, but if I try to synchronize again it tells me that the destination files are duplicated, and it will delete them all.
This is eliminated by putting a separate filter for each source, which filters its own package.
What I would like is to synchronize all packages that are at the same level of depth, keep in mind that the number of folders and packages can grow indefinitely. But the pattern will remain.
Source:
D:\Development\RootFolder\<AnyFolderInThisLevel>\bin\Debug\<AnyPackageInThisLevel>.nupkg
Destination:
D:\Nuget-Local-Cache
Help by synchronizing several files at the same level to the same destination folder
- Posts: 2
- Joined: 5 Jan 2024
- Attachments
-
- Second synchronization
- 002.png (141.22 KiB) Viewed 1070 times
-
- First synchronization
- 001.png (44 KiB) Viewed 1070 times
- Posts: 2450
- Joined: 22 Aug 2012
You can not Mirror-sync multiple source folders to one and the same destination folder.
This results in exactly the (self created) problems you are experiencing.
You could potentially Update-sync multiple source folders to one and the same destination folder, but is to be strongly discouraged because of the risk of having identically named files in the root of your source folders or in in an identical path relative to the root of your source folders.
Instead, you should e.g. sync
D:\Development\RootFolder\FolderA\bin\Debug\PackageA.X.Y.X.nupkg
to D:\Nuget-Local-Cache\PackageA.X.Y.X.nupkg
and sync
D:\Development\RootFolder\FolderB\bin\Debug\PackageB.X.Y.X.nupkg
to D:\Nuget-Local-Cache\PackageB.X.Y.X.nupkg
etc.
So, sync each source folder to a separate destination folder.
This results in exactly the (self created) problems you are experiencing.
You could potentially Update-sync multiple source folders to one and the same destination folder, but is to be strongly discouraged because of the risk of having identically named files in the root of your source folders or in in an identical path relative to the root of your source folders.
Instead, you should e.g. sync
D:\Development\RootFolder\FolderA\bin\Debug\PackageA.X.Y.X.nupkg
to D:\Nuget-Local-Cache\PackageA.X.Y.X.nupkg
and sync
D:\Development\RootFolder\FolderB\bin\Debug\PackageB.X.Y.X.nupkg
to D:\Nuget-Local-Cache\PackageB.X.Y.X.nupkg
etc.
So, sync each source folder to a separate destination folder.
- Posts: 4056
- Joined: 11 Jun 2019
Or why not just mirror-sync
D:\Development\RootFolder\FolderA\bin\Debug\
to
D:\Nuget-Local-Cache\
D:\Development\RootFolder\FolderA\bin\Debug\
to
D:\Nuget-Local-Cache\