I've seen a few different types of files here and there from digging through games on my computer or just the computer code and I've ran across a couple file types that you can't edit, or at least I haven't been able to, in Notepad++.
How do you make/edit these types of files:
.dll
.bat(batch files)
.dat
That's all I can think of right now. Thanks.
For batch files, you should be able to right click it and click on Edit, which will bring up a notepad... Not sure how the other ones work exactly.
Sounds like a question I would have made 6 years ago.
You can't edit DLL files. They are compiled binary executable files. Some of them have a manifest file embedded within them, which you can use to edit dialogs, strings, bitmaps, and application info entries for each locale (see ResEdit or Resource Hacker). If you try to open a DLL with Notepad++, you will just find gibberish. The closest thing to editing a DLL file is using a hex editor (see HxD).
You can edit batch files very easily in NPP. Just right click your file and click on "Edit with Notepad++" or open Notepad++ and drag the batch file onto it.
.dat files are application-specific data, so they may or may not be text. Most of the time, however, they are binary (again, just shows up as gibberish), requiring a solid understanding of the binary format used within that file in order to hack it with a hex editor.
To clarify further, the extension on the end of the filename doesn't tell you a great deal about what's in the file. Your OS (like Windows) will associate specific file extensions with viewer programs that know how to interpret their contents, and many file formats are documented publicly, but many more don't have specific viewers and/or don't have a publicly-documented format. As oldmud0 said, .dat is a generic extension for data that the application knows how to open and contains useful data, but the format can be just about any sequence of bytes that makes sense to the application. You may get some insight by exploring files in a hex editor (I prefer
XVI32).
So say a program ran on .dat files. Could dig deep into the program and figure out how it reads those .dat files and read them that way?
seanlego23 wrote:
So say a program ran on .dat files. Could dig deep into the program and figure out how it reads those .dat files and read them that way?
There are at least four ways to figure out the format of those files, which in the best cases you can combine:
1) Look at the program's source code and see how it reads and writes those files.
2) Make an educated guess, look at a selection of such files, test your guesses, build up a spec, then try creating your own files and seeing if the program can read them, to validate your spec.
3) Find notes from other people who have investigated those files.
4) Ask the program's author(s).
KermMartian wrote:
There are at least four ways to figure out the format of those files, which in the best cases you can combine:
1) Look at the program's source code and see how it reads and writes those files.
2) Make an educated guess, look at a selection of such files, test your guesses, build up a spec, then try creating your own files and seeing if the program can read them, to validate your spec.
3) Find notes from other people who have investigated those files.
4) Ask the program's author(s).
The program I am talking about with the .dat files is Minecraft. I'm looking at a bunch of the files right now. Most of them, not all of them are .dat, some are .jar, .gz, etc. Is there a place I should look for minecraft's actual source code or is there none?
My purpose here is to edit the world's from the files and not change anything other than.
mr womp womp wrote:
For batch files, you should be able to right click it and click on Edit, which will bring up a notepad... Not sure how the other ones work exactly.
I saw this online, it doesn't work because they took it out sometime before Windows 10. There is supposed to be an "edit" command in command prompt apparently, but that doesn't work either.
What I do with batch files, is right-click on it, and then click "Edit with Notepad++". Very simple
PT_ wrote:
What I do with batch files, is right-click on it, and then click "Edit with Notepad++". Very simple
How do you change it from gibberish into a readable file?
I've no gibberish... I dunno how you can read it correctly though
seanlego wrote:
The program I am talking about with the .dat files is Minecraft.
Oh. Why didn't you say so? There are Python libraries to manipulate Minecraft maps:
https://github.com/Khroki/pymclevel/
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
»
Go to Registration page
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum