How to make text files from a folder of files - same name but *.txt?

airborne

Honorary Master
Joined
Jul 13, 2007
Messages
18,067
I have quite a few files archived on an external hdd and what I want to do is find a program that I can point a folder of files to and it will generate a *.txt file for each file, ie "filename".txt and if it could insert the file properties into the body of the text file that would be even better, say extension: mp4 size: 980mb etc.

I'm on Windows 10.

Then when that bunch of *.txt files is placed in a folder on my pc it will be indexed, so if I search for a movie title it'll show me the txt file, so then I know I have that movie on the ext hdd and then if I open the txt file it'll show the properties of the movie file.

I remember seeing a program that could do this, anyone know of one?
I think there is even a CMD prompt that will do this function?
 
Last edited:

msquared

Expert Member
Joined
Mar 29, 2016
Messages
4,885
Run CMD

Go to your root directory of said drive (E.g. e: and cd\)

dir /a /s (Do NOT do this on your Windows drive as there are too many files)

Copy and Paste into Excel and use Text to Columns
 

Batista

Executive Member
Joined
Sep 2, 2011
Messages
7,909
I have quite a few files archived on an external hdd and what I want to do is find a program that I can point a folder of files to and it will generate a *.txt file for each file, ie "filename".txt and if it could insert the file properties into the body of the text file that would be even better, say extension: mp4 size: 980mb etc.

I'm on Windows 10.

Then when that bunch of *.txt files is placed in a folder on my pc it will be indexed, so if I search for a movie title it'll show me the txt file, so then I know I have that movie on the ext hdd and then if I open the txt file it'll show the properties of the movie file.

I remember seeing a program that could do this, anyone know of one?
I think there is even a CMD prompt that will do this function?

I can do this for you quick sticks on c#?Mahala

What is your real end goal here?
 

Batista

Executive Member
Joined
Sep 2, 2011
Messages
7,909
I can do this for you quick sticks on c#?Mahala

What is your real end goal here?

Im done with the program,

Sample output :

C:\jTemp\Working\Excel\Invoices.xlsx .xlsx 135726 bytes
 

Park@82

Honorary Master
Joined
Jun 6, 2008
Messages
13,403
Karen's Directory Printer.


A long time ago I used it to do more or less what you want to do. the files were listed in one text file tough and I could search the text file to see if I already had that file...
 
Last edited:

Batista

Executive Member
Joined
Sep 2, 2011
Messages
7,909
Ok Im done,can mail you the exe or solution if you want to build it yourself.

https://pasteboard.co/GRN8xnn.png
https://pasteboard.co/GRN9Al1.png


GRN8xnn.png


Code :

https://pasteboard.co/GRNacFj.png
 
Last edited:

Park@82

Honorary Master
Joined
Jun 6, 2008
Messages
13,403
What is your real end goal here?
my stab at it:

The OP is downloading movies/shows at work. He collects these movies on his HDDs at home. He needs a way to check if he already has certain movies so that he doesn't download it again.
 

Batista

Executive Member
Joined
Sep 2, 2011
Messages
7,909
my stab at it:

The OP is downloading movies at work. He collects these movies on his HDDs at home. He needs a way to check if he already has certain movies so that he doesn't download it again.

Lol then this program would work just fine.
 

airborne

Honorary Master
Joined
Jul 13, 2007
Messages
18,067
Chaps it's all in the op, I want the program to scan a folder and generate a "filename". txt for each file it finds, ideally placing the file properties into the text file. To be honest the files don't need to be text files, have *.txt extension nor contain the original file properties though it would be very handy to have that. The main thing is I want the filename to match the original filename, the extension can be anything. Then that file can be indexed by Void tool's Everything program and when I'm searching for something I will be able to see if it's on my external hdd or not without having to connect it.

Batista can your program do that? Thanks for going to the effort to make that.
 

Krosis

Well-Known Member
Joined
Mar 1, 2015
Messages
205
my stab at it:

The OP is downloading movies/shows at work. He collects these movies on his HDDs at home. He needs a way to check if he already has certain movies so that he doesn't download it again.

[Directed at OP] Then shouldn't the text files have the same file extensions as the files so the downloader does all the work of letting you know the file already exists rather than you manually checking a whole bunch of text files scattered over several folders? I used a similar trick when I was downloading a large number of files on my phone that I would later move to my PC. So file.mp4 would be replaced by a text file of the same name and extension so if I tried downloading it again the downloader would prompt if I wanted to replace the file or save both copies.
 

backstreetboy

Honorary Master
Joined
Jun 15, 2011
Messages
37,552
Chaps it's all in the op, I want the program to scan a folder and generate a "filename". txt for each file it finds, ideally placing the file properties into the text file. To be honest the files don't need to be text files, have *.txt extension nor contain the original file properties though it would be very handy to have that. The main thing is I want the filename to match the original filename, the extension can be anything. Then that file can be indexed by Void tool's Everything program and when I'm searching for something I will be able to see if it's on my external hdd or not without having to connect it.

Batista can your program do that? Thanks for going to the effort to make that.
Under Voidtools just turn off automatically remofe offline volumes...
 

airborne

Honorary Master
Joined
Jul 13, 2007
Messages
18,067
Under Voidtools just turn off automatically remofe offline volumes...
That might work but it will create confusion, now when I see a .txt extension I know immediately where the file is. With void can I specify only that one drive to not be automatically removed because if I can't the that solution definitely won't work.
 

airborne

Honorary Master
Joined
Jul 13, 2007
Messages
18,067
[Directed at OP] Then shouldn't the text files have the same file extensions as the files so the downloader does all the work of letting you know the file already exists rather than you manually checking a whole bunch of text files scattered over several folders? I used a similar trick when I was downloading a large number of files on my phone that I would later move to my PC. So file.mp4 would be replaced by a text file of the same name and extension so if I tried downloading it again the downloader would prompt if I wanted to replace the file or save both copies.
My application is not for downloading but your scenario is an interesting one, what program did you use to generate the fake/phantom files?
 

Krosis

Well-Known Member
Joined
Mar 1, 2015
Messages
205
My application is not for downloading but your scenario is an interesting one, what program did you use to generate the fake/phantom files?
By using the command line, you can create a file with the file names & proceed to create files using that list once the files have been moved.
 

Batista

Executive Member
Joined
Sep 2, 2011
Messages
7,909
Chaps it's all in the op, I want the program to scan a folder and generate a "filename". txt for each file it finds, ideally placing the file properties into the text file. To be honest the files don't need to be text files, have *.txt extension nor contain the original file properties though it would be very handy to have that. The main thing is I want the filename to match the original filename, the extension can be anything. Then that file can be indexed by Void tool's Everything program and when I'm searching for something I will be able to see if it's on my external hdd or not without having to connect it.

Batista can your program do that? Thanks for going to the effort to make that.


Yeppers, it does that, simply choose any file in a directory and the program will scan all files and create txt files with info inside.

Pm me your email addy if you want this.
 

airborne

Honorary Master
Joined
Jul 13, 2007
Messages
18,067
Yeppers, it does that, simply choose any file in a directory and the program will scan all files and create txt files with info inside.

Pm me your email addy if you want this.
Pm'd!
 

GoB

Expert Member
Joined
Jan 7, 2008
Messages
1,578
DIR /B/S C:\Temp\*.JPG > FileList.txt
for /F "tokens=*" %%A in (FileList.txt) do ECHO %%~zA > DummyFiles\%%~nxA.txt
 
Top