load .m3u and a tab for copy operations ,can I ?

English support forum

Moderators: white, Hacker, petermad, Stefan2

giulia
Senior Member
Senior Member
Posts: 317
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: load .m3u and a tab for copy operations ,can I ?

Post by *giulia »

Horst.Epp wrote: 2023-09-03, 16:42 UTC I can't tell you how to get this result with an easy Regex.
Try to use one of the Regex learning websites like
https://www.regular-expressions.info/index.html
hi
it's pretty hard to use regex to remove some texts
do you think do someone know how do it?
thanks
love Total Commander , best file manager ever made
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Horst.Epp »

giulia wrote: 2023-09-03, 17:02 UTC
Horst.Epp wrote: 2023-09-03, 16:42 UTC I can't tell you how to get this result with an easy Regex.
Try to use one of the Regex learning websites like
https://www.regular-expressions.info/index.html
hi
it's pretty hard to use regex to remove some texts
do you think do someone know how do it?
thanks
There are some Regex Gurus in the forum.
Wait to get a solution or tip.
My solution for your first request was found with KI (ChatGPT)
Windows 11 Home x64 Version 23H2 (OS Build 22631.3737)
TC 11.03 x64 / x86
Everything 1.5.0.1382a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: load .m3u and a tab for copy operations ,can I ?

Post by *white »

giulia wrote: 2023-09-03, 16:27 UTC I have done, may I ask a question about ?

Code: Select all

A:\music\1966\The Who Sings My Generation\1. Out In The Street.mp3
if i want to replace and obtain for example

Code: Select all

A:\music\1966\

or even better

Code: Select all

A:\music\

what code should i use?
Please describe in English what you want. For example, delete everything after second backslash. Or delete filename, parent folder and grandparent folder.
giulia
Senior Member
Senior Member
Posts: 317
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: load .m3u and a tab for copy operations ,can I ?

Post by *giulia »

white wrote: 2023-09-03, 17:52 UTC
giulia wrote: 2023-09-03, 16:27 UTC I have done, may I ask a question about ?

Code: Select all

A:\music\1966\The Who Sings My Generation\1. Out In The Street.mp3
if i want to replace and obtain for example

Code: Select all

A:\music\1966\

or even better

Code: Select all

A:\music\

what code should i use?
Please describe in English what you want. For example, delete everything after second backslash. Or delete filename, parent folder and grandparent folder.
Hi White
sadly english is not my native language
but well yes delete everything after the second backslash and after the third backslash , just to do some tests
seeing i have used
Put the cursor on the beginning of your file.
Menu: Search / Replace
Enable Regular expression under Search Mode
Find what: [^\\]*$
Press Replace All
Press Close
Save your file
Done
and total commander did not copy the folder structure but it did copy on the same folder many files , maybe the playlist contains many duplicate files
thanks
love Total Commander , best file manager ever made
User avatar
white
Power Member
Power Member
Posts: 4677
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: load .m3u and a tab for copy operations ,can I ?

Post by *white »

giulia wrote: 2023-09-04, 06:33 UTC but well yes delete everything after the second backslash and after the third backslash
If everything is deleted after the second backslash then there isn't a third backslash anymore..

This deletes everything after the second backslash:

Code: Select all

Find what:     ^(.*?\\.*?\\).*
Replace with:  $1
Fla$her
Power Member
Power Member
Posts: 2390
Joined: 2020-01-18, 04:03 UTC

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Fla$her »

giulia wrote: 2023-09-03, 16:27 UTC

Code: Select all

A:\music\1966\The Who Sings My Generation\1. Out In The Street.mp3
if i want to replace and obtain for example

Code: Select all

A:\music\1966\
Find what: ^(.*?\\){3}\K.+
giulia wrote: 2023-09-03, 16:27 UTC or even better

Code: Select all

A:\music\
Find what: ^(.*?\\){2}\K.+

For both cases:
Replace with: <empty>
☑ Wrap around
◉ Regular expression ⃞ . matches newline
Overquoting is evil! 👎
giulia
Senior Member
Senior Member
Posts: 317
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: load .m3u and a tab for copy operations ,can I ?

Post by *giulia »

white wrote: 2023-09-04, 08:35 UTC
giulia wrote: 2023-09-04, 06:33 UTC but well yes delete everything after the second backslash and after the third backslash
If everything is deleted after the second backslash then there isn't a third backslash anymore..

This deletes everything after the second backslash:

Code: Select all

Find what:     ^(.*?\\.*?\\).*
Replace with:  $1



Fla$her wrote: 2023-09-04, 10:28 UTC
giulia wrote: 2023-09-03, 16:27 UTC

Code: Select all

A:\music\1966\The Who Sings My Generation\1. Out In The Street.mp3
if i want to replace and obtain for example

Code: Select all

A:\music\1966\
Find what: ^(.*?\\){3}\K.+
giulia wrote: 2023-09-03, 16:27 UTC or even better

Code: Select all

A:\music\
Find what: ^(.*?\\){2}\K.+

For both cases:
Replace with: <empty>
☑ Wrap around
◉ Regular expression ⃞ . matches newline


@white
hi
thanks
@Fla$her
Hi
thank you so much!
love Total Commander , best file manager ever made
giulia
Senior Member
Senior Member
Posts: 317
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: load .m3u and a tab for copy operations ,can I ?

Post by *giulia »

Hi
may I ask you this question ?
why does tc copy a folder like A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\ to cd1
and A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\ to cd2

I used tc 11.01 to copy these folders

Code: Select all

A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
to root destination

Code: Select all

cd1
and

Code: Select all

A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
to

Code: Select all

cd2
1)
why doesn't tc command create a folder like Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\ or Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\ ?
2)
why does tc skip the folder structure ? and why doesn't tc copy the all folder structure and only cd1?

thanks

the playlist is

Code: Select all

A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd2\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
A:\Myaudio\Air - Twentyears [2CD Deluxe Edition] (2016)\cd1\
love Total Commander , best file manager ever made
giulia
Senior Member
Senior Member
Posts: 317
Joined: 2013-09-14, 05:33 UTC
Location: Europe

Re: load .m3u and a tab for copy operations ,can I ?

Post by *giulia »

Horst.Epp wrote: 2023-08-27, 15:50 UTC You can use the TC command LOADLIST to get the list into one TC window.
From there, you can handle the entries with the normal file functions.
Here is a button with this command (adapt the Icon path)

Code: Select all

TOTALCMD#BAR#DATA
LOADLIST
%P%N
C:\Tools\Wincmd\WCMICONS48.DLL,31
LoadList from file under cursor

0
-1
Select a .m3u file and hit the button.
hi
can I ask you a question?
why doesn't tc copy the entire folder structure ?
thanks
love Total Commander , best file manager ever made
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Horst.Epp »

giulia wrote: 2023-09-20, 16:06 UTC
Horst.Epp wrote: 2023-08-27, 15:50 UTC You can use the TC command LOADLIST to get the list into one TC window.
From there, you can handle the entries with the normal file functions.
Here is a button with this command (adapt the Icon path)

Code: Select all

TOTALCMD#BAR#DATA
LOADLIST
%P%N
C:\Tools\Wincmd\WCMICONS48.DLL,31
LoadList from file under cursor

0
-1
Select a .m3u file and hit the button.
hi
can I ask you a question?
why doesn't tc copy the entire folder structure ?
thanks
Here it does it.
If the file list has an entry like
C:\TEMP\Test\
If this list is loaded and copy used on this entry
the full tree is copied to the target dir.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3737)
TC 11.03 x64 / x86
Everything 1.5.0.1382a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Fla$her
Power Member
Power Member
Posts: 2390
Joined: 2020-01-18, 04:03 UTC

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Fla$her »

giulia wrote: 2023-09-20, 16:06 UTC why doesn't tc copy the entire folder structure ?
TC is not trained in this. To copy the structure, you need to use the wcx plugin CopyTree or TreeCopyPlus.
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Horst.Epp »

Fla$her wrote: 2023-09-20, 17:18 UTC
giulia wrote: 2023-09-20, 16:06 UTC why doesn't tc copy the entire folder structure ?
TC is not trained in this. To copy the structure, you need to use the wcx plugin CopyTree or TreeCopyPlus.
If he had prepared the list as suggested, there is no need for a plugin.
TC copies the whole folder structure, while copying a folder entry from the list loaded by LOADLIST.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3737)
TC 11.03 x64 / x86
Everything 1.5.0.1382a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Fla$her
Power Member
Power Member
Posts: 2390
Joined: 2020-01-18, 04:03 UTC

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Fla$her »

Horst.Epp wrote: 2023-09-20, 17:52 UTC TC copies the whole folder structure, while copying a folder entry from the list loaded by LOADLIST.
If the question is asked, it means that the current behavior is not satisfied.
TC copies from the list the folder itself with the contents, it doesn't copy the higher-level folders.

P. S.: I wonder when you will finally realize that over-quoting is evil :?:
Overquoting is evil! 👎
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6532
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Horst.Epp »

Fla$her wrote: 2023-09-20, 18:07 UTC
Horst.Epp wrote: 2023-09-20, 17:52 UTC TC copies the whole folder structure, while copying a folder entry from the list loaded by LOADLIST.
If the question is asked, it means that the current behavior is not satisfied.
TC copies from the list the folder itself with the contents, it doesn't copy the higher-level folders.

P. S.: I wonder when you will finally realize that over-quoting is evil :?:
If the target folder is placed onto the required start level
it creates the full tree.
Btw. I like my quoting, it's not meant to satisfy your rules :)
Windows 11 Home x64 Version 23H2 (OS Build 22631.3737)
TC 11.03 x64 / x86
Everything 1.5.0.1382a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Fla$her
Power Member
Power Member
Posts: 2390
Joined: 2020-01-18, 04:03 UTC

Re: load .m3u and a tab for copy operations ,can I ?

Post by *Fla$her »

Horst.Epp wrote: 2023-09-20, 18:22 UTCIf the target folder is placed onto the required start level it creates the full tree.
The target directory can be any, as well as the paths in the list, so even manually creating a chain of directories does not save here.
Spoiler
Horst.Epp wrote: 2023-09-20, 18:22 UTC Btw. I like my quoting, it's not meant to satisfy your rules :)
These are not my rules. These are the rules of decency of behavior on forums in general. They are spelled out in many places. When you cite a text (a bunch of nested quotes) that you don't respond to, you fill in the extra space of the topic/screen, thereby taking away extra attention and time from readers. Of course, this is annoying for many who are not lazy to edit the quoted. It is unfortunate that there is no rule that regulates this.
Overquoting is evil! 👎
Post Reply