Question

How do I add a folder to my "path"?

Asked by: jodyfaison

This may be nuts, but i have a lot of *.m3u play lists that don't seem to work. They don't reference my d drive where the files live. They do reference the folder "my albums" though. Would they work if i added "my albums" to my system variable path, i think it's called, like c:\windows, etc?
The true path is in my "my documents" folder, which i moved to my d: drive.
The actual folder I want to reference is something like "d:\jody's stuff\my music\my albums."

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-11-26 at 01:44:18ID23936693
Tags

Microsoft

,

Windows xp

,

sp3

Topics

MS DOS

,

Software MP3 Media Players

Participating Experts
3
Points
500
Comments
18

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. hear album music
    can you give me a solution or code about media because i'm developing a music web site , i can not hear an album, i only hear a song for each times. i used to JSP language to develop
  2. iPod Album Art
    Hi experts. I'm trying to set up album art on my ipod (5.5gen). I'd prefer not to use software like iTunes which is going to restrict me like hell. Currently I'm using Easytag to manage my music collection and MediaMonkey to sync to my ipod. Here's the deal: my music collec...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: dbruntonPosted on 2008-11-26 at 02:12:50ID: 23040791

at the command line or put this into a batch file

path=%path5%;"D:\jody's stuff\my music\my albums"

This may or may not work for your music player.  I suspect not.

 

by: jodyfaisonPosted on 2008-11-26 at 06:16:05ID: 23042070

Well, I guess your right about that not working for the play lists, as it didn't.
I'm assuming I got it there, to my path. How would I check that? When I type path at a command prompt, it gives me back the line you suggested.

 

by: AmazingTechPosted on 2008-11-26 at 09:35:22ID: 23043957

Use notepad to open your .m3u file you'll probably see that it is specifying the MP3 file to an absolute path. You'll need a script to update the .m3u file.

 

by: AmazingTechPosted on 2008-11-26 at 09:38:19ID: 23043977

Oh. It seems to depend on where you put the .m3u file whether it's created on the same drive as the .mp3 or not.

 

by: dbruntonPosted on 2008-11-26 at 11:42:15ID: 23044987

Yeah.

You generally have a choice of where to save the .m3u files using music players depending on the music player.  Some default to My Documents; some don't.

Check the correct path you want.

Open up the file in a good text or word processor and do a global search and replace.

If for example the path shown is My documents then replace it with the correct path.

Save - making sure you are saving as a text document - and retry your music player.

 

by: jodyfaisonPosted on 2008-11-26 at 12:01:32ID: 23045145

OK, thanks guys. I was just wanting to avoid the editing process as I have probably 300 *.m3u files with the "..\my albums\ray charges\jack.mp3" , for example, path.
But the player is not reading the my albums path I guess.
I wonder if there's a tool that would search and replace text in those m3u files, in the folder, without opening them up and doing it manually 300 times. Is that called a grepping tool?  

 

by: dbruntonPosted on 2008-11-26 at 12:30:05ID: 23045400

Yep.

Here's links to some that will do the job.

http://www.thefreecountry.com/programming/searchandreplace.shtml

http://gnuwin32.sourceforge.net/packages/gsar.htm

Can't really comment on any of them as haven't had the need to use them.

 

by: AmazingTechPosted on 2008-11-26 at 13:11:41ID: 23045770

I can create a script but need to know what your m3u files look like.

Are the lines in the m3u list the mp3 file as

My Albums\Somefolder\Somefile.mp3

I suppose you moved all your mp3 "My Albums" out of your profile to "d:\jody's stuff\my music\my albums"

 

by: jodyfaisonPosted on 2008-11-27 at 18:55:08ID: 23053448

Hey thanks again guys,
Yes AmazingTech that's basically the correct path and a script would be GREAT!!
For some reason the files have two dots before the my albums,
like this:
..My Albums\Somefolder\Somefile.mp3

THANK YOU
I've been gone for the US holiday, Thanksgiving, sorry to keep you guys waiting, but I'm back.

 

by: BillDLPosted on 2008-11-28 at 09:24:39ID: 23056641

Jody, excuse my ignorance of mp3 players in general, but perhaps I can make things easy for you in future using stuff I do know about.

The two dots in front of the folder name like this:
..\my albums\ray charges\jack.mp3
means that whatever is reading that path to find out where the .mp3 file is, takes one step back UP the folder ladder to the parent folder and then moves forward (Down) from there to get to it.

So, if this was your original folder structure:

C:\Documents and Settings\Jody\My Music\My Albums\Ray Charles\Jack.mp3
C:\Documents and Settings\Jody\My Music\My Albums\Ray Charles\Jill.mp3
etc
C:\Documents and Settings\Jody\My Music\Playlists

and this is a path from the relevant line in your *.m3u file:

..\My Albums\Ray Charles\Jack.mp3

then it looks like the *.m3u file must have been in the folder "Playlists", or another sub-folder of the "My Music" master folder at that same level as the "Playlists" folder.  Look at it again.  The two dots tell it to move from "Playlists" back up to "My Music", and then Forward (Down) into the "My Albums" folder from where the rest of the absolute path is then specified.

If that is a "Ray Charles.m3u" playlist currently sitting right in the "Ray Charles" folder, then going back up one folder (ie. to the "My Albums" folder), and then going forward (Down) looking for a sub-folder of "My Albums" also named "My Albums" is not going to find that folder.

You either have to lose the ..\ from the front of each line in the *.m3u files and then make sure that they are right in the MASTER folder of the first folder specified in the path within the *.m3u file, OR convert them all to fully qualified paths and avoid moving folders around.

Are your *.m3u files created automatically as you play them, ie. in the ORDER you play them, or are they just an alphabetic listing of file names in each album folder?

If they are just an alphabetic listing of files, then a simple batch file executed inside each "album" folder will overwrite the existing *.m3u files in a sort order that you specify from a couple of choices.

@echo off
for /f "tokens=1,2,3* delims= " %%i in ('dir /on /b %CD%\*.m3u') do @set M3UName=%%i %%j %%k
dir /on /b /s *.mp3 > %M3UName%
exit

The sort Order can be any of the following:

/on = By file name ascending alphabetic
/o-n = By file name descending alphabetic
/os = By file size, smallest first
/o-s = By file size, largest first
/od = By date, oldest first
/o-d = By date, newest first
/oe = By file extension, ascending alphabetic
/o-e = By file extension, descending alphabetic

Change references from *.mp3 to *.wmv to list a different media file type.

the /b and /s switches used with the DIR command will list the files without any superfluous junk in the report, but will also list all files of the specified type in SUB-Folders.  This gives you a fully qualified path to the files in each of the *.m3u files ather than Relative paths.

Instead of moving a batch file around from folder to folder running it, what I used to use was a new custom registry setting that allowed me to Right-Click on any folder and choose a new option named "Make M3U Here".  That created (and overwrote an existing) a new "Playlist.m3u" in that folder bearing only the names of the files.

Would this help you better in the long term?

By the way, is it Ray Charles, or some French guy named Ray Charges? ;-)

 

by: BillDLPosted on 2008-11-28 at 09:41:59ID: 23056698

Hi
I have uploaded a *.reg file, but have had to rename the file extension from .REG to .TXT.  Providing you can see the .TXT extension after the file name "Make-M3u-Here" when you have downloaded the file, then that's fine.  Just follow the instructions down at the attachment link.

If you don't see the .TXT file extension in Windows Explorer, then use the Tools menu > Folder Options > "View" tab, and untick the box entitled "hide file extensions of known file types".  Click "Apply", and you will see the .txt extension to rename to .reg, and you can then reverse the setting to hide the file extensions again.

This creates a new Right-Click setting for folders entitled "Make M3u Here", and will generate a new "Playlist.m3u" file in the folder you right-clicked on.  The playlist will be of file names only, so it will only work if left in that folder.  It can easily be changed, however, just as the registry menu setting can be easily removed if not needed.

  • Make-M3u-Here.txt
    • 448 bytes

    Right-Click > Rename file and change .txt at end of file name to .reg, then Right-Click and choose "Merge" to write new custom setting to registry.

 

by: AmazingTechPosted on 2008-11-28 at 10:12:32ID: 23056807

Here's the script for you jodyfaison:

Make changes to

Set M3UFolder=C:\AT\Playlist
Set UpdatedM3UFolder=C:\AT\NewPlaylist

M3UFolder is where your M3U files are now.
UpdatedM3UFolder will create new M3U files so you can check to make sure they work without destroying your original M3U file.

If for some reason My Albums doesn't appear in the file path or it can't verify the location a prompt will ask you whether you want to search "d:\jody's stuff\my music\my albums" this will search for the exact file name. It will prompt you if you want to change to this new location.

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
 
Set M3UFolder=C:\AT\Playlist
Set UpdatedM3UFolder=C:\AT\NewPlaylist
Set Change=my albums=$d:\jody's stuff\my music\my albums
Set SearchFolder=d:\jody's stuff\my music\my albums
 
IF NOT EXIST "%UpdatedM3UFolder%" MD "%UpdatedM3UFolder%"
 
for /f "tokens=*" %%a in ('dir /a-d /b "%M3UFolder%\*.m3u"') do (
    ECHO Working on playlist "%%a"
    IF EXIST "%UpdatedM3UFolder%\%%a" DEL "%UpdatedM3UFolder%\%%a"
    for /f "tokens=*" %%b in ('type "%M3UFolder%\%%a"') do (
        Set yn=
        ECHO %%b | FIND /i "#EXT">NUL
        IF NOT ERRORLEVEL 1 (
            ECHO %%b>>"%UpdatedM3UFolder%\%%a"
        ) ELSE (
            IF NOT EXIST "%%b" (
                Set M3UFile=%%b
                Set M3UFile=!M3UFile:%Change%!
                FOR /f "Tokens=1,* delims=$" %%m in ('ECHO !M3UFile!') do (
                    IF EXIST "%%n" (
                        ECHO %%n>>"%UpdatedM3UFolder%\%%a"
                    ) ELSE (
                        CLS
                        ECHO.
                        ECHO From playlist "%%a" I could not locate:
                        ECHO %%b
                        ECHO.
                        ECHO Would you like to search "%SearchFolder%" for
                        ECHO "%%~nxb"
                        ECHO.
                        SET /p yn=Type 'y' or 'n': 
                        IF /i "!yn!" == "y" (
                            Set Accept=
                            FOR /f "Tokens=*" %%c in ('dir /a-d /b /s "%SearchFolder%\%%~nxb"') DO (
                                IF NOT DEFINED Accept (
                                    ECHO.
                                    ECHO Found! File "%%~nxb" here:
                                    ECHO %%c
                                    ECHO.
                                    SET /p yn=Type 'y' to accept this location: 
                                    IF /i "!yn!" == "y" SET Accept=%%c
                                )
                            )
                            IF DEFINED Accept (
                                ECHO !Accept!>>"%UpdatedM3UFolder%\%%a"
                            ) ELSE (
                                ECHO %%b>>"%UpdatedM3UFolder%\%%a"
                            )
                        ) ELSE (
                            ECHO %%b>>"%UpdatedM3UFolder%\%%a"
                        )
                    )
                )
            ) ELSE (
                ECHO %%b>>"%UpdatedM3UFolder%\%%a"
            )
        )
    )
)

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:

Select allOpen in new window

 

by: jodyfaisonPosted on 2008-11-30 at 18:22:46ID: 23065884

Wow thank you guys! One question on the script. How do I put that into play? I've got it copied as a text file, but I'm not sure what to do next. What kind of script is it?
thanks,
j

 

by: jodyfaisonPosted on 2008-11-30 at 18:29:09ID: 23065905

btw, the reg file works great, thank you BilDL

 

by: BillDLPosted on 2008-12-01 at 01:20:52ID: 23067053

You're welcome Jody.

The "script" provided by AmazingTech in the Code Snippet is a standard (albeit pretty clever) "batch file".  Windows XP doesn't have real DOS like older Windows versions, but it follows very much the same pattern as DOS.  DOS batch files have the .BAT file extension.  In Windows XP you can save the text file in Notepad as a .CMD (preferred) or .BAT file.  You can name the file anything you want, eg. "M3u_Folder.cmd".

Hint:
When doing a Save As in Notepad, in the Filename field change the *.txt to your new file name and add the .cmd after it, then enclose the full file name in " " before clicking the Save button.  That forces it to save as a *.cmd file rather than *.txt.

To run the batch file just double-click on it.  You will see the black Command window will open and you will be prompted to type in information.  If the window doesn't close when done, just treat it as a standard Windows window and close with the top right "X" button.

 

by: AmazingTechPosted on 2008-12-01 at 08:20:43ID: 23069901

Yes. You're welcome Jody.

Also when saving using Notepad in the save as window make sure the Encoding says ANSI.

 

by: jodyfaisonPosted on 2008-12-03 at 11:16:44ID: 23089070

OK, guys you've been great. Sorry to be out so long, for some reason the site wouldn't let me on, saying I've attempted to access the site to many times. Well I think I know what's causing that, an accerleration tweak my son put in possible, but all is working well now, will close out shortly.

 

by: AmazingTechPosted on 2008-12-04 at 23:37:14ID: 23103026

Congratulations on your new bundle of joy.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...