Windows 10: I'd like to generate a list with *only* file names

Discus and support I'd like to generate a list with *only* file names in Windows 10 Support to solve the problem; - Winkey, “cmd” - “cd e:\media\trainingvids” - “dir *.* /s /b /a -d > c:\temp\dork.txt” So, with that I'm opening a command prompt, changing to... Discussion in 'Windows 10 Support' started by FoxyBoxOfRox, Dec 26, 2015.

  1. I'd like to generate a list with *only* file names


    - Winkey, “cmd”
    - “cd e:\media\trainingvids”
    - “dir *.* /s /b /a -d > c:\temp\dork.txt”

    So, with that I'm opening a command prompt, changing to the correct directory, doing a directory listing of all files (including sub-directories (/s), no headers or footers so 'bare' format (/b), and trying to NOT display the directory (/a -d) – and then sending/piping that (>) to a file I've designated to be named and created (dork.txt) in a temporary directory (\temp) that already exists on my c:\.

    The problem is that it doesn't work. I'm not able to find a way to NOT include the full path along with the file names. I want a resultant file that JUST has the full file names, and could use some quick help with syntax, or maybe I've got it all wrong and it can't be done in this way.

    I need the process to work for both Windows 10 and Windows 7 machines, so hopefully there is no difference in the DOS syntax between the two, as I know there were slight differences with much older DOS versions.

    Of course, if there are sexy new ways to achieve this list in Windows 10, I'm all ears.

    Reference:
    - dir (command) - Wikipedia, the free encyclopedia

    :)
     
    FoxyBoxOfRox, Dec 26, 2015
    #1
  2. 7thSense Win User

    I'd like company names displayed with names.

    This is not currently possible. I suggest you add this suggestion over at the official user voice site:

    http://windowsphone.uservoice.com/
     
    7thSense, Dec 26, 2015
    #2
  3. I'd like company names displayed with names.

    I'm using Win7 Pro and Outlook with the Windows Live connector software to get my contacts shared in Outlook and my phone with Windows Phone 7.5. In Outlook the contacts are displayed as company then name. Is there a way to make this happen in Widows
    Live and my phone? I have several contacts with the same name so when one of them call, I don't know which one it is before I answer.
     
    MikeBrendle, Dec 26, 2015
    #3
  4. topgundcp Win User

    I'd like to generate a list with *only* file names

    topgundcp, Dec 26, 2015
    #4
  5. Brink
    Brink New Member
    Brink, Dec 26, 2015
    #5
  6. Thank you everyone, but I'm going to change my request to DOS only. I need a batch file to work.

    And using batch files with Basic code is still a function available within Windows 10, so I don't believe I'm off-topic.

    Thank you in advance, if anyone can help me get this syntax sorted!
     
    FoxyBoxOfRox, Jan 3, 2016
    #6
  7. Ztruker Win User
    Ztruker, Jan 3, 2016
    #7
  8. I'd like to generate a list with *only* file names

    Thanks Ztruker. The boys over there at StackOverflow solved it for me. (You have to use a For loop.)

    To those that come across this thread: just right-click and create a new Text Document file and name it whatever you want, and locate it wherever you want, but you have to change the .txt file extension to .bat for it to run (e.g. GetFileNames.bat), and paste the DOS Basic code below into it. Change the directory values in the code as needed, and also whatever resultant inventory file name you want. Double click on your new Batch file from within Explorer to generate the new inventory text file (e.g. dork.txt -or- name it FileInventory.txt).

    Each time you run the Batch file, the old inventory file will be overwritten, so you'll have to move it first, or just rename it, if you want the old inventory values.

    Also note that you can change the *.* value to .pdf if you want an inventory of just the PDF files. Or .mp3 if you just want those music files, etc. Any file type you want an inventory of.

    Code: @echo off > "C:\temp\dork.txt" ( for /F "eol=| delims=" %%F in (' dir /B /S /A:-D "E:\media\trainingvids\*.*" ') do ( echo(%%~nxF ) )[/quote]
     
    FoxyBoxOfRox, Jan 4, 2016
    #8
  9. Ztruker Win User
    Good, glad you got it working.
     
    Ztruker, Apr 4, 2018
    #9
Thema:

I'd like to generate a list with *only* file names

Loading...
  1. I'd like to generate a list with *only* file names - Similar Threads - I'd generate list

  2. I'd like for file explorer's Preview pane improved

    in Windows 10 Gaming
    I'd like for file explorer's Preview pane improved: It's neat but takes up lots of space. this can be helped by:-Putting the preview pane in an appropiately sized box/rectangle oriented at the top/bottom right of file explorer, so that less space is needlessly taken up from it.-If on a 16:9 monitor the preview pane takes up...
  3. I'd like for file explorer's Preview pane improved

    in Windows 10 Software and Apps
    I'd like for file explorer's Preview pane improved: It's neat but takes up lots of space. this can be helped by:-Putting the preview pane in an appropiately sized box/rectangle oriented at the top/bottom right of file explorer, so that less space is needlessly taken up from it.-If on a 16:9 monitor the preview pane takes up...
  4. I'd like to try editing imageres.dll. Experience with that file?

    in Windows 10 Customization
    I'd like to try editing imageres.dll. Experience with that file?: I'd like to substitute two icons of my choice for two of the icons in Imageres.dll. I think I know how to do it, and I think I have the software to accomplish the task, but I've read too many horror stories about this sort of thing to be comfortable with carrying out the...
  5. File Explorer is generating a recursive list of files in a folder.

    in Windows 10 Network and Sharing
    File Explorer is generating a recursive list of files in a folder.: One of my directories has a sub-folder that contains another folder with the same name. It contains a sub-folder with the same name and this goes on and on I assume for hundreds of levels. I can create a new folder in a sub level and it automatically creates the same folder...
  6. I'd like to request a refund for minecraft.

    in Microsoft Windows 10 Store
    I'd like to request a refund for minecraft.: I purchased Minecraft Windows 10 starter collection about 10 days ago. My child didn't like it so I've been trying to get a refund since. Couldn't do it through my Microsoft account and have been trying to get hold of customer support but to no avail. Anyone knows how to...
  7. I'd like to know

    in Windows Hello & Lockscreen
    I'd like to know: Why Microsoft feels they have a right to lock my computer and not allow me access because I had to hard-power down a few times, after my system locked up? I paid for the computer, not Bill Gates. So unless Microsoft wants to reimburse me for the cost of my laptop $1800,...
  8. I'd like to disable onedrive

    in Windows 10 Software and Apps
    I'd like to disable onedrive: disable onedrive https://answers.microsoft.com/en-us/windows/forum/all/id-like-to-disable-onedrive/e896484e-cf8a-4449-9cc2-290b963cdd2b
  9. I'd like a clear understanding why.................

    in Windows 10 Performance & Maintenance
    I'd like a clear understanding why.................: Why the system will not accept a NTFS formatted 32GB USB drive for system image back up ? Why must I use an external hard drive ? I AM using a 1TB ext. hdd for backups. I just want to know why not USB flash drive. 42122
  10. I stumbled on a list I'd like to share.

    in Windows 10 Support
    I stumbled on a list I'd like to share.: If you're a control freak, like me, you may be interested in this. I found it completely by accident. Maybe its not a secret, but I've never heard of it. 234 setting commands listed alphabetically. I have yet to figure a way to save the list as a readable/search able file. It...