How Do I Make This On 1 Line?

I have multiple lines of the same thing.

I could also use Notepad ++

#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
LVL 3
Computer GuyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Martin LissOlder than dirtCommented:
I don't understand the question.
0
Frosty555Commented:
I'm assuming you have a textfile, with multiple lines that look like this:

#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3

Open in new window

(Perhaps with slightly different text or timestamps, but the pattern is the same)

You should use Notepad++ for this.

- Open the text file in Notepad++
- Open the "Replace" dialog box by pressing CTRL+H
    * Set the search mode to "Regular Expression"
    * untick the ". matches newline" checkbox
    * "Find What" should be:        
(#TIME)(.*)(\r\n)(.*)(\r\n)

Open in new window

   * "Replace With" should be:    
\1\2 \4\5

Open in new window

This will replace this pattern:

"#TIME", then a bunch of characters, then a newline, then a bunch of characters, then a newline  

with this pattern:

"#TIME", then a bunch of characters, then a SPACE, then a bunch of characters.

It essentially will strip out the line break inbetween the two lines.
0
Computer GuyAuthor Commented:
I have a playlist in txt format that has this for 50 songs (different ones though)

#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
#TIME:13:53
D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3

Want to make it like this:
Column 1      Column 2                                                                     Column 3
#TIME:13:53 D:\Live\Phish\NYE 2011\2011-12-31 II New York, NY\02 - Phish - Light.mp3
0
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

Frosty555Commented:
Okay let me revise my original statement:

Find What:
(#TIME)(.*)(\r\n)(.*)(\r\n)

Open in new window

Replace With:
\1\2, \4\5

Open in new window


(added a comma into the "replace with" box)

This will give you three columns, separate by commas, which you can now import into excel.

Keep in mind that Excel might get confused if your filenames actually contain a comma, it will throw off the parser. It will probably be fastest for you to just manually fix those occurrences, if  any.
0
Computer GuyAuthor Commented:
I tried that, it gave me 2 columns. I really want the 02 - Phish - Light.mp3 portion in a new column
0
Frosty555Commented:
That means you need a pattern that finds the last backslash on the second line, and wraps the fields in doublequotes so that Excel doesn't get confused by the comma in your album name.

That's a bit tricker. I'll test out a few things and get back to you.
0
Frosty555Commented:
Try this:

Find what:
(#TIME)(.*)(\r\n)(.*)(\\)(.*)(\r\n)

Open in new window

Replace with:  
"\1\2","\4","\6"(\r\n)

Open in new window


Save it as a .TXT file, and then open it in Excel.

It's important that the file is saved as a .TXT file, and that there is no spaces inbetween the columns. Each column should be a string, enclosed in doublequotes, separated by a single comma with no spaces on either side).

When the Text Import Wizard opens up in Excel, specify that it is a Delimited file, with "comma" as the delimiter, and with the Text Qualifier as a doublequote (") character.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Computer GuyAuthor Commented:
Cool. Few more then.

Make: 13 - Gwen Stefani - Crash.mp3 TO "Gwen Stefani", "Crash" (omitting 13 - and .mp3)

Make: Avicii - Le7els.mp3 TO "Avicii", "Le7els" (omitting .mp3)
0
Computer GuyAuthor Commented:
Hi,

I did the following. How can I do this not that the songs / artists are in their seperated columns.

Also, It's easier for me to do all of the renaming all over again, that's fine too. I still have my origianal files.

Make: 13 - Gwen Stefani - Crash.mp3 TO "Gwen Stefani", "Crash" (omitting 13 - and .mp3)

Make: Avicii - Le7els.mp3 TO "Avicii", "Le7els" (omitting .mp3)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.