Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How Do I Export Text File

10 Jan 2020   #11
Brink

64-bit Windows 10 Pro
 
 

(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 System SpecsSystem Spec
.
10 Jan 2020   #12
WyattWhiteEagle

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

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 System SpecsSystem Spec
10 Jan 2020   #13
Brink

64-bit Windows 10 Pro
 
 

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

10 Jan 2020   #14
iko22

Windows 7 x64, Vista x64, 8.1 smartphone
 
 

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 System SpecsSystem Spec
10 Jan 2020   #15
WyattWhiteEagle

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by iko22 View Post
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 System SpecsSystem Spec
10 Jan 2020   #16
WyattWhiteEagle

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

Quote   Quote: Originally Posted by iko22 View Post
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 System SpecsSystem Spec
10 Jan 2020   #17
WyattWhiteEagle

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

I don't believe some of my switches are being redirected to other switches. Is that possible?
My System SpecsSystem Spec
.
10 Jan 2020   #18
iko22

Windows 7 x64, Vista x64, 8.1 smartphone
 
 

What makes you think that?
My System SpecsSystem Spec
10 Jan 2020   #19
WyattWhiteEagle

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 

I had that thought after considering the 2 switches are producing the same results
My System SpecsSystem Spec
10 Jan 2020   #20
iko22

Windows 7 x64, Vista x64, 8.1 smartphone
 
 

The only other format DIR can produce, is with the /D and /W omitted.
My System SpecsSystem Spec
Reply

 How Do I Export Text File




Thread Tools




Similar help and support threads
Thread Forum
How do I change JPEG to text file...add text and reconvert to JPEG?
I need to find out if I can change a JPEG to a txt file...insert random text and reconvert to JPEG in order to see how I can create a distorted/new image. Is it possible...and if so how?
Music, Pictures & Video
can't export my msinfo32 file
The process starts fine but when it comes to the display he crashed I've included a picture
General Discussion
Command Line Prompt - How To Export List of Files to Text File
Hi guys, I have a folder with 995 files in it and I'd like to give someone a text file with a list of all these files in it. Is there a way that I can get the command line to send the names of these files to a text file? I tried navigating to the directory and using the DIR command and,...
General Discussion
In WLM, how to export the Contact Groups in a .csv file ?
In WLM, how to export the Contact Groups in a .csv file ?
Browsers & Mail
export txt file from excel help
i have tried (and succeeded) to export a txt file from excel 2010 but each column is separated by a tab and i want it to be separated by a "|" character so it can be used in a program i have edited thanks
Microsoft Office


Our Sites

Site Links

About Us

Find 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 17:10.
Twitter Facebook