computer nerds - is there a way to do this?

edited October 2013 in Chit chat
copy (in text form) the title of every file in a certain folder on your desktop, so you can paste the list into a word document.

Instead of methodically typing out every file-name one by one.

I imagine I can't be the first person that's wanted to do this, so is there a way?
Post edited by def chris on

Comments

  • edited October 2013
    dir *.* > test.txt

    the content of the directory will be inside the test.txt file

    (you have to open the Command Prompt window and go to the desired folder)
  • edited October 2013
    Open a Command Prompt.

    Navigate to the folder. Type;

    dir >oink.txt

    Done. :)
    Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
    My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
    Twitter: Sokurah
  • edited October 2013
    Is this your extensive collection of Scouting for Girls mp3s?
    The comp.sys.sinclair crap games competition 2015
    "Let's not be childish. Let's play Spectrum games."
  • edited October 2013
    Or if you just want the filenames, then it's:
    dir /b > list.txt
  • edited October 2013
    PowerSlave wrote: »
    dir *.* > test.txt

    the content of the directory will be inside the test.txt file

    (you have to open the Command Prompt window and go to the desired folder)
    Hairy wrote: »
    Or if you just want the filenames, then it's:
    dir /b > list.txt

    Thanks I'll try this later , however being honest I don't entirely understand what dir *.* > test.txt or dir /b > list.txt even means. Is that something I type in somewhere? sorry I am a spaz.
    leespoons wrote: »
    Is this your extensive collection of Scouting for Girls mp3s?
    pah...I don't listen to rubbish like that.

    No, it's my extensive collection of Nickelback mp3s.
  • edited October 2013
    def chris wrote: »
    Thanks I'll try this later , however being honest I don't entirely understand what dir *.* > test.txt or dir /b > list.txt even means. Is that something I type in somewhere? sorry I am a spaz.

    Type or paste that line into a dos prompt.

    Dir gives a listing of files and folders in a directory
    *.* just means list everything
    and > test.txt means send the results to the file test.txt instead of the screen

    Oh, using the above command 'as is' requires you to be in the directory you want to list.

    Cheers
  • edited October 2013
    def chris wrote: »
    Thanks I'll try this later , however being honest I don't entirely understand what dir *.* > test.txt or dir /b > list.txt even means. Is that something I type in somewhere? sorry I am a spaz.

    It's a command line prompt. Go to the Windows button bottom left (assuming you aren't on Windows 8 ) and type CMD.

    It'll probably come up with a prompt like this:
    C:\Users\DefChris>
    
    Type dir to view the subfolders in the DefChris folder. To change folders, type cd foldername at the command prompt - "cd Nickelbackmp3s" or whatever - and it'll now say
    C:\Users\DefChris\Nickelbackmp3s>
    
    Keep going until you've got to the right folder - if you need to go up a level type
    cd..
    
    Think of it as a text-based version of your normal Windows folders and you'll get the hang of it.

    Once you're at the right folder type the following at the prompt:
    dir > list.txt
    
    Then go to the folder in Windows, and voila, one list.txt file.
    The comp.sys.sinclair crap games competition 2015
    "Let's not be childish. Let's play Spectrum games."
  • edited October 2013
    Excellent, cheers, thanks... it worked.

    have some spoons cutlery-spoons.jpg
    Saboteur wrote: »
    Type or paste that line into a dos prompt.

    Dir gives a listing of files and folders in a directory
    *.* just means list everything
    and > test.txt means send the results to the file test.txt instead of the screen

    Oh, using the above command 'as is' requires you to be in the directory you want to list.

    Cheers
    thanks also, but even this explanation would've been too complicated for me. example of what a div I am with computers.:-)
  • edited October 2013
    You can also type a letter or 2 of a filename or directory and press tab which cycles through files or directories that begin with those letters, if you are lazy

    And there's no such thing as a DOS prompt in windows these days ;) It's a command prompt. Last time windows was powered by DOS was windows ME I think.
  • edited October 2013
    You may not need this and I couldn't see anybody suggesting it, but if you have a subdirectory (or folder within a folder of you like), you can add /s to get the contents of that listed at the same time

    dir *.* /s>outputfile.txt

    Also works fine with /b as

    dir *.* /s /b>outputfile.txt
  • edited October 2013
    dir /?

    lists all the options available as well.

    Maybe one day there will be a version of Windows produced that allows you to copy to clipboard any of the text displayed in the user interface. The amount of times I've had to manually type something displayed on a message box into google. I think Windows 7 allows you to copy text from message boxes now?
  • edited October 2013
    dir /?

    lists all the options available as well.

    Maybe one day there will be a version of Windows produced that allows you to copy to clipboard any of the text displayed in the user interface. The amount of times I've had to manually type something displayed on a message box into google. I think Windows 7 allows you to copy text from message boxes now?

    Some, not all (unless it's been improved in an update?). And yes, Windows has always lacked obvious things like a 'Right click over a directory, and select "Print Directory"' function, a 'Copy whatever text is in the highlighted window/box' function, a default load function for a file with no extension (so if you click on a file with no extension then it will always load that file with a pre-defined program, the way, for example, you can set Notepad to be the default program for .txt files), and the obvious functions when copying/moving such as;

    No to All (there's a Yes to All on the menu, why not a No to All?),

    If a file is being copied/moved, and there's a file with the same name in the destination directory, then if the two files are identical, byte for byte then just delete the one in the source directory, don't bother asking me to 'Replace or Cancel ?'

    If a file is being copied/moved, and there's a file with the same name in the destination directory, then if the two files are NOT identical then automatically rename the second file so both co-exist, don't bother asking me should you rename it.




    And why is every edition of the Windows search function moving farther away from what it should be?
  • edited October 2013
    ewgf wrote: »
    Some, not all (unless it's been improved in an update?). And yes, Windows has always lacked obvious things like a 'Right click over a directory, and select "Print Directory"' function, a 'Copy whatever text is in the highlighted window/box' function, a default load function for a file with no extension (so if you click on a file with no extension then it will always load that file with a pre-defined program, the way, for example, you can set Notepad to be the default program for .txt files), and the obvious functions when copying/moving such as;

    No to All (there's a Yes to All on the menu, why not a No to All?),

    If a file is being copied/moved, and there's a file with the same name in the destination directory, then if the two files are identical, byte for byte then just delete the one in the source directory, don't bother asking me to 'Replace or Cancel ?'

    If a file is being copied/moved, and there's a file with the same name in the destination directory, then if the two files are NOT identical then automatically rename the second file so both co-exist, don't bother asking me should you rename it.




    And why is every edition of the Windows search function moving farther away from what it should be?

    This sounds like a job for SuperCopier http://supercopier.en.softonic.com/
  • edited October 2013
    Ah, I still miss the simple elegance of the DOS prompt.
  • edited October 2013
    CTRL-C on a windows dialogue pop up copies it to the clipboard.

    paste it into notepad or whatever and strip away the unwanted stuff (the message box title, the buttons, etc)
  • edited October 2013
    ewgf wrote: »
    No to All (there's a Yes to All on the menu, why not a No to All?),

    Shift-click No and it does No to All. Has done since Windows 95.

    ewgf wrote: »
    If a file is being copied/moved, and there's a file with the same name in the destination directory, then if the two files are identical, byte for byte then just delete the one in the source directory, don't bother asking me to 'Replace or Cancel ?'


    The reason it doesn't do that is because it takes far longer to potentially read every single byte of every file in order to decide they're the same. This is especially true if the files in question happen to be on hierarchical storage and require Bob in the datacentre to insert a tape into the tape library so that Windows can recover the file.

    ewgf wrote: »
    If a file is being copied/moved, and there's a file with the same name in the destination directory, then if the two files are NOT identical then automatically rename the second file so both co-exist, don't bother asking me should you rename it.

    That's so often exactly the opposite of what you want to happen. That actually makes it impossible to overwrite a file by simply copying a new one over it. It also makes it exceptionally hard when you copy a bunch of files to deterministically know what they ended up being called.
    And why is every edition of the Windows search function moving farther away from what it should be?
    I type stuff into search. It finds it almost instantly regardless of whether it's information on the web, in a file, the name of a file, in an email etc. it even collates all the results into a single pane. I'm not sure what more search "should be"
  • edited October 2013
    MattLamb wrote: »
    Ah, I still miss the simple elegance of the DOS prompt.

    I rarely bother with the Command Prompt any more, it's much easier to get stuff done in Powershell.
  • edited October 2013
    AndyC wrote: »
    Shift-click No and it does No to All. Has done since Windows 95.

    Then why don't they actually put this in the option box? Or are we all supposed to be physic? They list "Yes to all", so why not actually list the "No to all" too?




    The reason it doesn't do that is because it takes far longer to potentially read every single byte of every file in order to decide they're the same. This is especially true if the files in question happen to be on hierarchical storage and require Bob in the datacentre to insert a tape into the tape library so that Windows can recover the file.
    [/QUOTE]

    They wouldn't necessarily have to compare every byte, they could just compare file sizes, which would show 99% of the times when the files are different. And if it was a question of time, then how much time is wasted waiting for the user to respond?

    I mean, how often have you set a large folder to copy or move to another drive, nipped to the vending machines to get a drink, stopped to talk to someone, safe in the knowledge that when you get back the file transfers are finished, yet when you get back you find only 2% of the files have been moved, and ****ing Windows has stopped dead saying that file x is a system file, are you sure you want to move it?





    That's so often exactly the opposite of what you want to happen. That actually makes it impossible to overwrite a file by simply copying a new one over it. It also makes it exceptionally hard when you copy a bunch of files to deterministically know what they ended up being called.[/QUOTE]

    Yes, but sometimes you do want them both, which is why it should be an option.

    I type stuff into search. It finds it almost instantly regardless of whether it's information on the web, in a file, the name of a file, in an email etc. it even collates all the results into a single pane. I'm not sure what more search "should be"

    Something like File Locator (http://www.mythicsoft.com/welcome), that finds all files (Windows has a habit of not finding all files, sometimes if two files should be found in the same directory it only finds one), doesn't look inside zip files, that doesn't need a drive to be indexed, etc.
  • edited October 2013
    ewgf wrote: »
    Then why don't they actually put this in the option box? Or are we all supposed to be physic? They list "Yes to all", so why not actually list the "No to all" too?

    I have no idea. Thankfully the replaced dialogs in Windows 8 make this rather a moot point.

    egwf wrote: »
    They wouldn't necessarily have to compare every byte, they could just compare file sizes, which would show 99% of the times when the files are different. And if it was a question of time, then how much time is wasted waiting for the user to respond?

    I really don't think "sometimes overwrite files and sometimes don't, then let the user guess" is a viable option. No matter how much time "wasted" letting the user choose, it's almost certainly inconsequential compared to the wasted time and money applying that kind of logic to multi-terabyte hierarchical systems that have to go back and forth pulling things across networks or even from tape. Explorer has to scale up to scenarios far, far bigger than just the disk in your laptop and so many of these "why can't it just..." approaches fall down horribly when you consider what's involved as it scales up.

    FWIW the Windows 8 copy process will attempt to do as much of the rest of the copying in the background while waiting for responses to dialogs like this, so it is a least wasting less time.

    egwf wrote: »
    Yes, but sometimes you do want them both, which is why it should be an option.

    Again, Windows 8's copy dialogs have been completely revamped so it will now give you that option (though personally I find it all a tad chatty these days)
Sign In or Register to comment.