Copy single file(s) into multiple directories
Moderators: white, Hacker, petermad, Stefan2
Copy single file(s) into multiple directories
Hello fellow Total Commander users.
I used Total Commander to extract a bunch of playlist files from my folders with music.
(I searched the files - feed to listbox - and then moved the playlist files to a seperate directory)
Now I would like to copy these playlist files (one by one) back to the directories.
Is that possible?
I used Total Commander to extract a bunch of playlist files from my folders with music.
(I searched the files - feed to listbox - and then moved the playlist files to a seperate directory)
Now I would like to copy these playlist files (one by one) back to the directories.
Is that possible?
Do you have any association for "this file" into "that directory"?
- - -
If not you can use TreeCopyPlus next time:
(search for the files - feed to listbox - use packer plugin TreeCopyPlus then to move the playlist files to a separate directory, keeping the folder structure)
How-to:
Suchen (Search)
Anwenden (Feed to listbox)
Strg+A (Ctrl+A)
Alt+F5
Packer (o)=>[TreeCopyPlus] +++ [konfigurieren] ([Configure] (how many path level?) [OK])
[OK]
- - -
or http://www.ghisler.com/plugins.htm
- - -
If not you can use TreeCopyPlus next time:
(search for the files - feed to listbox - use packer plugin TreeCopyPlus then to move the playlist files to a separate directory, keeping the folder structure)
How-to:
Suchen (Search)
Anwenden (Feed to listbox)
Strg+A (Ctrl+A)
Alt+F5
Packer (o)=>[TreeCopyPlus] +++ [konfigurieren] ([Configure] (how many path level?) [OK])
[OK]
- - -
see www.totalcmd.netTreeCopyPlus 1.051
(c) Alexander Golikov aka SUKER
----------------
Packer plugin for Total Commander.
It's intended for copying/moving files with keeping of full folder tree (see examples below).
or http://www.ghisler.com/plugins.htm
Hi Stefan2 - not sure what you have in mind.Stefan2 wrote:Do you have any association for "this file" into "that directory"?
There is no file association as such.
I just would like to copy back my *.m3u files to the directories where they came from.
I am aware of the option to "copy to all selected folders" - but that would copy all the playlist files - to all the directories that I choose - and that is not what I want..
Maybe I will have a go with TreeCopyPlus - and see if it solves my problem
Personal License: 109213
Yes, but how should one know which file belongs to which folder?steyrs wrote:
There is no file association as such.
I just would like to copy back my *.m3u files to the directories where they came from.
That's why I ask for a relationship.... perhaps by the name of m3u files and folders?
(copy ABBA.m3u to X:\Music\Albums\ABBA)
If not, you have to take a list of that relationship,...
f.ex. with TreeCopyPlus (and best with some further steps...)
or create a list of *.m3u files from your original folder:
- open DOS-Box
- cd to your main music folder
- switch to PowerShell
- create a list with this PoSh command:
GCI -rec *.m3u |ForEach{$A=Split-Path $_.FullName -Leaf; "COPY ""$A"" ""$_"" " } |select -first 5 |Out-file "myList.CMD.txt"
- open that "myList.CMD.txt" and see if it makes sense.
(COPY "ABBA.m3u" "X:\Music\Albums\ABBA\ABBA.m3u")
(Or change the PoSh command to get
COPY "ABBA.m3u" "X:\Music\Albums\ABBA\ABBA.m3u MOD.m3u"
just by using: "COPY ""$A"" ""$_ MOD.m3u"" " in the PoSh comamnd)
- copy that "myList.CMD.txt" to your "separate directory" as "myList.CMD"
If you execute it, it will copy each OriginName.m3u to the right folder.
But only if you have no files or folders with same name?
It's not easy to help with so minimal info and no examples provided. All what I say might by wrong for your situation.
Hi Stefan2.
First of all - don't get me wrong!
I really appreciate you - trying to help me.
I have posted an image here - to clarify what I'm trying to accomplish.
https://postimg.org/image/ygx66t4rl/
So yes - there is an relationship - between file name and foldername.
Does it make sense now - if not - don't hesitate to ask.
First of all - don't get me wrong!
I really appreciate you - trying to help me.
I have posted an image here - to clarify what I'm trying to accomplish.
https://postimg.org/image/ygx66t4rl/
So yes - there is an relationship - between file name and foldername.
Does it make sense now - if not - don't hesitate to ask.
Personal License: 109213
Thanks, but still no full path, so we can provide only a more common help:steyrs wrote: I have posted an image here - to clarify what I'm trying to accomplish.
For example
FROM:
c:\Temp\ToCmd\A\Artist One.m3u
c:\Temp\ToCmd\A\Artist Three.m3u
c:\Temp\ToCmd\A\Artist Two.m3u
TO:
c:\Temp\ToCmd\B\Artist One\Artist One.m3u
c:\Temp\ToCmd\B\Artist Three\Artist Three.m3u
c:\Temp\ToCmd\B\Artist Two\Artist Two.m3u
- open DOS-Box
- change to "c:\Temp\ToCmd\A" with the *.m3u files
- execute
FOR /F "tokens=*" %X in ('dir /B') DO @COPY "%X" "c:\Temp\ToCmd\B\%~nX\%X"
That command does:
- for each m3u file in "c:\Temp\ToCmd\A"
- take only the base name w/o extension (\%~nX\) as the wanted folder name
- and copy the m34 to the folder with same base name
Of course adjust the paths to yours.
And execute in DOS-Box the "copy /?"-command to see the help of the copy command
and take care of the "/Y" switch for overwriting existing files.
Make sense?
Last edited by Stefan2 on 2017-11-14, 13:08 UTC, edited 1 time in total.
Hi Stefan2!Stefan2 wrote:
For example
FROM:
c:\Temp\ToCmd\A\Artist One.m3u
c:\Temp\ToCmd\A\Artist Three.m3u
c:\Temp\ToCmd\A\Artist Two.m3u
TO:
c:\Temp\ToCmd\B\Artist One\Artist One.m3u
c:\Temp\ToCmd\B\Artist Three\Artist Three.m3u
c:\Temp\ToCmd\B\Artist Two\Artist Two.m3u
- open DOS-Box
- change to "c:\Temp\ToCmd\A" with the *.m3u files
- execute
FOR /F "tokens=*" %X in ('dir /B') DO @COPY "%X" "c:\Temp\ToCmd\B\%~nX\%X"
That command does:
- for each m3u file in "c:\Temp\ToCmd\A"
- take only the base name w/o extension (\%~nX\) as the wanted folder name
- and copy the m3u to the folder with same base name
Of course adjust the paths to yours.
And execute in DOS-Box the "copy /?"-command to see the help of the copy command
and take care of the "/Y" switch for overwriting existing files.
Make sense?
Yes it made sense!
And it works like a charm - you are a genius
Thx a bunch!
Personal License: 109213