Copy to multiple folders in one step

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Copy to multiple folders in one step

Post by *wanderer »

Here's one scenario.

I have a structure of folders (i.e. in a folder A, i have 10 subfolders -A1 to A10- with several subfolders each, several levels deep). In each folder, in one of the levels (not the same level in all folders) i have a file (F). In a separate folder (B) i have a newer version of F.

In TC, menu Show/Custom files i select to see this file only and then i go to A and press CTRL+B, so i see all instances of F. I would now like to mass-copy this file from B to all its instances under A.

From what i've seen, TC does not have a straight-forward way to achieve this. Are there any other options?

In any case, i would like to file this as a TC request. It's not the first time i have faced this need and maybe i'm not the only one.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Copy to multiple folders in one step

Post by *gdpr deleted 6 »

Are there any other options?
Once you have all the instances of the old F's in branch view, this should be doable with a script (possibly in conjunction with TCBL) that is being assigned to a user command and/or toolbar button.

The necessary input data would consist of the path of the source file (the new file F), and a list of paths of the target files (the old F's). Both of those can be provided to the script via TC's command parameters. (But be aware of confusingly quirky behavior of some command parameters when used in branch view -- which, i admit, could be used as an argument against a user command/toolbar button-based solution in your scenario.)

Assuming the paths of the old F's is being provided by a list file, the script itself could probably be as simple as a batch file with a for loop reading the list file line-by-line and executing a copy command...
User avatar
tuska
Power Member
Power Member
Posts: 3760
Joined: 2007-05-21, 12:17 UTC

Re: Copy to multiple folders in one step

Post by *tuska »

Hi,

Try this example:
  1. Search in separate process... Alt+Shift+F7
  2. Search for: ev:file: Filters.csv ... OR ... Filters.csv
  3. press button "Feed to listbox"
  4. press Select All - Ctrl Num+ (OR ... button with command: cm_ExchangeSelBoth)
  5. unmark the newer version of "Filters.csv"
  6. mark the newer version of "Filters.csv" in the other TC window
  7. press button "F5 Copy"
  8. [✓] Copy to all selected folders/links in the target panel
  9. OK
  10. press button "Overwrite all"
  11. DONE!
See also: Copy Files Into Multiple Folders
User avatar
wanderer
Power Member
Power Member
Posts: 1578
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Copy to multiple folders in one step

Post by *wanderer »

Thank you both for your input. Tuska's way was the solution!
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
Post Reply