Is it possible to convert an EXE file back to a Bat - batch-file

A few years ago I made a batch text based RPG and I wanted to go back to it, but I found the EXE of the game but I was wondering if it's possible to revert it back into bat format?
edit: Sorry for the lack of information, A few years ago I used a bat to EXE converter and I'm wondering if I can convert the EXE back into bat format to work on the game again, the EXE was also found on an old cloud of mine so that is the only file present

Well this is possible... the truth is most Batch to EXE converters don't actually convert your code, but instead wrap them in an exe file.. so when you run your exe what its actually doing is placing a copy of your original batch file into your temporary directory and running it from there...
what you need to do is open your user file.. thats the directory that holds your documents and pictures and whatnot.. and at the end of your user directory in the address bar, type..
\AppData\Local\Temp
or %temp% in your command line

Related

Quickest way to create a .bat file (as .txt)

I have a couple lines of code in a batch file in Windows 10 that open a session of Octave, and load a script that uses design parameters contained in a .txt file. The batch file is named (for example) "Design123.bat", and when Octave runs, it automatically finds the design parameters in the file "Design123.txt" by simple string manipulation of the file name, i.e. strrep(filename,".bat",".txt"), where filename = '%~dpn0' is passed to Octave from the batch file. This allows for the contents of the batch file to stay simple and constant, and the file name of the batch file is the only thing tying it to the .txt file.
I do all of this to allow running the Octave script by double-clicking the batch file for convenience, instead of being forced to use the more tedious process of uigetfile in Octave. This works very well, but the catch is that I have to place a copy of the batch file in the same directory with the design (.txt) files (of which there are thousands, but each within their own directory) and give it the same file name to get it to work. Is there a way to quickly create the batch files somehow? The most ideal situation I can think of is to be able to right-click (or somehow select) a .txt design file, and create a batch file (replacing .txt with .bat) and place my lines of code into it.
Any ideas? I have coding experience, but only in software packages like VBA and Octave, not within operating systems themselves, though certainly willing to learn if I could get pointed in the right direction. The design file names follow a distinctive pattern, so they could be filtered easily within an operation on the active "File Explorer" window in Windows 10, if something like that is possible. Thanks in advance.
You might want to compose the answer to your question from calling the script on the right click and running the .m script with command line arguments.
If that fails, uigetfile is certainly not the only method to get file. At the very least you could always copypaste a path string to a folder from explorer to octave function call.
Finally, I guess I'll mention the existence of octave-cli which runs in terminal instead of gui. It might be better suited for running non interactive scripts.

Move files into a jar with a .bat script

Just the title. I'm trying to make a .bat file that moves stuff into a .jar, but I have no idea what to do, or even if it's possible. If it's possible, could I be pointed towards the information that would allow me to create such a .bat file? Thanks.
"A .jar file is just a .zip file with a different extension. Use any zip tool that takes command line parameters like WinZip or 7-Zip, and call it from your batch file passing it the right information in the parameters to add the files. Once you pick your utility app, you can read its documentation to find out what parameters it takes and what order they should be in. (Or more easily, you could just open the file in WinZip or 7-Zip and drag and drop the files in using Windows Explorer and save the time and effort.)" - From Ken White, in a comment
Thank you Ken White, for your answer.
While I do agree not using commands is more convenient, I can't automate moving files without commands or code.
This is a valid answer. But for some reason an arbitrary restriction won't let me mark this post as the answer until two days.

Multiple encoding of videos using AviSynth and X264 from a bat file

at the moment i am encoding my videos (vhs restoration) using avisynth and x264 via dragging an .avs file onto a bat file.
This is working great, but my problem (well not really a problem, more of an efficiency issue) is that i have to manually keep dragging my avs files onto the bat to start the process. Would it be possible to have the bat file convert a whole directory of videos (maybe 20 or so) one after the other in an automated way?
The .avs file is always the same for each video except the AviSource() line.
I know i can loop the .bat for the number of videos present, but how do i load in the .avs file having a variable AviSource()?
How could i achieve this, or is it not possible?
Thanks.

Batch File Rename - Batch File needs to move from folder to folder

New to batch file writing. We are unable to install a file renamer program at work so i am looking to find a way to create a batch file to do the job instead. I want to create a batch file that i can place in a folder and it will rename all files in that folder with a prefix, while deleting some text from the file name itself. I am happy to edit the prefix text (as it changes all the time) in Notepad each time but I need to be able to move the batch file to the different folders.
The files will be something like this RDS_117856.pdf
and they need to read as xxx-xxx-xxx-117856.pdf
Any help would be great.
I am using windows, only have access to Notepad and no other coding software so a .BAT file would be the easiest thing to create here.

Create a Windows executable (.exe) from Batch and Vbscript

It is asked me to create a Windows executable (.exe) from scripts written in batch and vbscript. unluckily I don't know which tool use to realize that. Therefore Let me ask you some questions which torment my spirit
Is it possible to make a such build?
If it is, could you recommend me some open tools which do that?
To make an exe from bat+vbs, do you think I have to modify the
content of my scripts alot/a little?
Thank in advance for your feedback
Bat2Exe converts batch files including any other files in a certain folder into executables
http://www.bat2exe.net
"ExeScript Editor" can convert batch files under .bat and .cmd also it can convert .vbs and .vbscript file into a .exe
http://www.scriptcode.com/vbscripteditor/
What you want to do is:
First : Join the bat files and vbs files together in one file.
Second: "Make" a executable of that file to launch the main bat file.
Bat/VBS file can't be compiled, when you see a "compiled bat" it's only a simple .exe stub, the bat is not compiled neither converted, is only stored, so first you need to use a joiner and second you need to use a bat-2-exe "converter" like "ExeScript Editor", searching for the crack in Google to evaluate the program is not hard, I have it.
...But really the best you can do is to use WinRAR application with the SFX options which can join files (compress), make the exe, and can launch the main bat file after silent extraction.
PS: Really the best you can do is to learn the basic things of a real lenguage, embbed the bat/vbs files as resources and then compile it into a standalone executable.

Resources