Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Creating a numbered list

  • 03-03-2009 9:51am
    #1
    Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭


    I have bought a new MP3 player which has a remote and enables you to input a number and it will play the corresponding song.
    The problem is I obviously need to supply a numbered list of the songs to be able to do this.

    I don't want to have to write them all down manually. any idea what the quickest way to do it is in windows and print it off?


Comments

  • Registered Users, Registered Users 2 Posts: 81,220 ✭✭✭✭biko


    You want to add numbers to songs in a folder?
    Like from "Musicman.mp3" to "001 Musicman.mp3" ?


    Ah, you just want to print a list of all the songs.
    printfolder.gif
    You can add this option to the context menu by following these steps:

    1. You need to create a batch file called Printdir.bat. Open Notepad or another text editor and type (or cut and paste) this text:

    @echo off
    dir %1 /-p /o:gn > "%temp%\Listing"
    start /w notepad /p "%temp%\Listing"
    del "%temp%\Listing"
    exit

    Now, in the Save As dialog box, type "%windir%\Printdir.bat" (without the quotation marks) and click the Save button.

    2. Click Start, Control Panel, Folder Options.
    3. Click the File Types tab, and then click File Folder.
    4. Click the Advanced button.
    5. Click the New button.

    In the Action box, type "Print Directory Listing" (without the quotation marks).

    In the Application used to perform action box, type "Printdir.bat" (without the quotation marks).

    6. Click OK in all three dialog boxes to close the dialog boxes.

    You're not quite finished yet! Now you need to edit the Registry, so open your favorite Registry Editor.

    Navigate to HKEY CLASSES ROOT\Directory\shell.

    Right click on "default" and select Modify.
    In the File Data box, type "none" (without the quotation marks).

    Click OK and close the Registry Editor.

    Now when you right click a folder, you'll see the option to Print Directory Listing. Selecting it will print the contents of the folder.


    Quicker option:
    Open DOS by Start|Run|cmd.exe [Enter]
    Then navigate to the folder you want say d:\files
    - d:
    - cd files
    Now you are in the "files" directory, for printing the contents do as follows :
    - dir>contents.txt
    where content.txt is the text file that will be created.

    Open list in Excel to manipulate it.


  • Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭kleefarr


    Biko wrote:
    Ah, you just want to print a list of all the songs.

    Yes, but numbered so they show their relative position on the MP3 player. Then you can look at the list and type the number into the remote and it will play that song.

    Will either of your suggestions do that? It looks the second option is easiest but I was unable to navigate to the folder after starting cmd prompt. I could get to it in cmd prompt edit, but could not print a list.


  • Registered Users, Registered Users 2 Posts: 81,220 ✭✭✭✭biko


    That why you use excel to open file, to add the numbers.
    Once you are in the folder just type

    dir>list.txt

    and it will create a list in that folder.

    The list will have some info you don't need. If you open it in Excel and remove the bits you don't need you can the number them easily.

    If you can't get to folder via prompt, just move folder to C: temporarily


  • Registered Users, Registered Users 2 Posts: 5,141 ✭✭✭Yakuza


    dir /b > list.txt just lists out the bare file name, less crap to strip out with Excel :)


  • Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭kleefarr


    I have moved a small test folder to C: called Music. The original in nearly 4GB.

    I go into cmd.exe and I'm presented with..


    Microsoft Windows 2000 [Version 5.00.2195]
    (C) Copyright 1985-2000 Microsoft Corp.

    C:\Documents and Settings\my login name>

    So I add... C:\music

    to list the directory music and get..

    C:\Documents and Settings\my login name>C:\music
    'C:\music' is not recognized as an internal or external command,
    operable program or batch file.

    It's been a long time since I used cmd prompt and I'm not getting any younger, so I guess I'm doing some thing silly. :rolleyes:


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 81,220 ✭✭✭✭biko


    When you get the prompt type c:
    You'll then see C:\>
    Now type cd music
    You'll see C:\MUSIC>
    You are now in the music folder
    Type dir/b>list.txt
    This creates files and jumps back to C:\MUSIC>


  • Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭kleefarr


    This is what I get...

    Microsoft Windows 2000 [Version 5.00.2195]
    (C) Copyright 1985-2000 Microsoft Corp.

    C:\Documents and Settings\My login name> c:

    C:\Documents and Settings\My login name>cd music
    The system cannot find the path specified.

    C:\Documents and Settings\My login name>dir/b>list

    result..

    C:\Documents and Settings\My login name>

    When I run cmd.exe I always start at..
    C:\Documents and Settings\My login name>


  • Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭kleefarr


    Guys, I've managed to get a list of the files in the directory.

    The problem now, is the list is produced in alphabetical order where as the files in the directory are sorted by size. How do I get round this, as the resulting list is no good in alphabetical format. :(


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,604 Mod ✭✭✭✭Capt'n Midnight


    dir %1 /-p /o:gn

    n means sort (order the list) by name

    dir /os means sort by size smallest first
    dir /o-s means sort by size biggest first


    dir /b /ad lists only directories
    dir /b /a-d lists only files (no directories)

    dir /b /a-dh lists only hidden files


  • Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭kleefarr


    Thanks Capt'n Midnight.

    I'll try that out a bit later and let you know how it goes.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭kleefarr


    Thanks a lot guys.

    This is what worked for me.. D:\Music>dir /b/os> list.txt ;)

    And then five minutes of editing in excel.


  • Registered Users, Registered Users 2 Posts: 642 ✭✭✭red_fox


    I'm too late, but I've used http://www.fauland.com/af5.htm for similar before, just load the files and add a counter and save.


  • Registered Users, Registered Users 2 Posts: 5,744 ✭✭✭kleefarr


    red_fox wrote: »
    I'm too late, but I've used http://www.fauland.com/af5.htm for similar before, just load the files and add a counter and save.

    Worth remembering for future tests. Thanks.


Advertisement