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

19 Mar 2018   #1
WyattWhiteEagle

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 
How Do I Export Text File

Using a cmd prompt, how do I export to my desktop a text file which list only the filename, type and location of all mp3 files on my computer?

How would I export to my desktop the same thing but listing what is on an external drive or a usb flashdrive?

How about a txt file which list all mp3 in a folders without reflecting the filepath?

Also, How would I export a txt file listing all mp3 files inside a certain folder and subfolders?


My System SpecsSystem Spec
.
19 Mar 2018   #2
mrjimphelps

Linux Mint 18.2 xfce 64-bit (VMWare host) / Windows 8.1 Pro 32-bit (VMWare guest)
 
 

Type this command in the command prompt window:

dir c:\*.mp3 /s > c:\filelist.txt

This will do a directory listing on your entire C: drive, including all subdirectories, for all files which have .mp3 as their extension. It will direct the output of the command into a text file, c:\filelist.txt. Change the last part -- c:\filelist.txt -- to reflect the filename you want, in the subdirectory you want.

To do the same thing for your external drive or flashdrive, replace C: with whatever drive letter is used for that device.

I don't recall the switch you would use to get the filenames without the paths included, but I think it is /b. Go to a command prompt and type dir /? to get all of the information and options for the dir command.

If the switch is /b, then the above command would be changed as follows:

dir c:\*.mp3 /s /b > c:\filelist.txt

The /s switch tells it to do all subdirectories.

To get the listing for a certain folder and subfolders, let's say C:\My Music, do it like this:

dir "C:\My Music\*.mp3" /s > c:\filelist.txt
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 04:35.
Twitter Facebook Google+