How Do I Export Text File

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 72,043
    64-bit Windows 11 Pro for Workstations
       #11

    (File path list only)
    dir %UserProfile%\Desktop\*.mp3 /s /b > %UserProfile%\Desktop\MP3s.txt

    (Wide list format without individual file date/time/size)
    dir %UserProfile%\Desktop\*.mp3 /s /w > %UserProfile%\Desktop\MP3s.txt
      My Computer


  2. Posts : 166
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #12

    dir %UserProfile%\Desktop\*.mp3 /s /w > %UserProfile%\Desktop\MP3s.txt

    Using the above, the first is what is exported. The second is what I would like to see exported.
    I opened and customized for this post.

    If PowerShell is actually what I need to use, what would be the codes and how would I use them?

    Code:
     Volume in drive C has...
     Volume Serial Number is...
    
     Directory of %UserProfile%\Desktop\Audio
    
    (Garth Brooks) Double Live (Disc 1) [05] The Thunder Rolls (The Long Version) (10).mp3
    (Garth Brooks) Double Live (Disc 1) [05] The Thunder Rolls (The Long Version) (14).mp3
    (I Just) Died in Your Arms Tonight (2).mp3
    (I Just) Died in Your Arms Tonight (3).mp3
                   4 File(s)     23,865,532 bytes
    
     Directory of %UserProfile%\Desktop\Audio\Luke Bryan
    
    Apologize.mp3                        Better Than My Heart.mp3
    Country Girl (Shake It For Me).mp3   Crash My Party.mp3
    Do I.mp3                             Drink A Beer.mp3
    
    and so on...
    
                  23 File(s)    162,264,912 bytes

    Code:
     Volume in drive C has...
     Volume Serial Number is...
    
     Directory of %UserProfile%\Desktop\Audio
    
    (Garth Brooks) Double Live (Disc 1) [05] The Thunder Rolls (The Long Version) (10).mp3
    (Garth Brooks) Double Live (Disc 1) [05] The Thunder Rolls (The Long Version) (14).mp3
    (I Just) Died in Your Arms Tonight (2).mp3
    (I Just) Died in Your Arms Tonight (3).mp3
                   4 File(s)     23,865,532 bytes
    
     Directory of %UserProfile%\Desktop\Audio\Luke Bryan
    
    Apologize.mp3                        
    Better Than My Heart.mp3
    Country Girl (Shake It For Me).mp3
    
    and so on...
    
                  23 File(s)    162,264,912 bytes
      My Computer


  3. Posts : 72,043
    64-bit Windows 11 Pro for Workstations
       #13

    I'm not sure it's possible to have mixed output formats like that.
      My Computer


  4. Posts : 2,798
    Windows 7 x64, Vista x64, 8.1 smartphone
       #14

    Would it produce the desired format to use the /D switch in place of the /W, like:
    dir %UserProfile%\Desktop\*.mp3 /s /d > %UserProfile%\Desktop\MP3s.txt
      My Computer


  5. Posts : 166
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #15

    iko22 said:
    Would it produce the desired format to use the /D switch in place of the /W, like:
    dir %UserProfile%\Desktop\*.mp3 /s /d > %UserProfile%\Desktop\MP3s.txt
    I'll try it now and post the results :)
      My Computer


  6. Posts : 166
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #16

    iko22 said:
    Would it produce the desired format to use the /D switch in place of the /W, like:
    dir %UserProfile%\Desktop\*.mp3 /s /d > %UserProfile%\Desktop\MP3s.txt
    Hmmm, using the /D switch in place of the /W switch seems to produce the same format
      My Computer


  7. Posts : 166
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #17

    I don't believe some of my switches are being redirected to other switches. Is that possible?
      My Computer


  8. Posts : 2,798
    Windows 7 x64, Vista x64, 8.1 smartphone
       #18

    What makes you think that?
      My Computer


  9. Posts : 166
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
    Thread Starter
       #19

    I had that thought after considering the 2 switches are producing the same results
      My Computer


  10. Posts : 2,798
    Windows 7 x64, Vista x64, 8.1 smartphone
       #20

    The only other format DIR can produce, is with the /D and /W omitted.
      My Computer


 
Page 2 of 3 FirstFirst 123 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 05:25.
Find Us