When you get down to it, batch files and executable files work pretty much the same way. Both are simply a set of instructions and logic for Windows execute. So why would you want to convert a batch file to an executable if they essentially work the same? Here are a few reasons.
Batch File Example
For years, I've been using Google Drive as a quick and dirty way to convert dozens of Word files into PDFs with a few clicks (using this great tutorial as my guide). This saved me a lot of time in creating handouts for my students.One very obvious approach is to use IEXPRESS - the ancient built-in tool that creates self-extracting packages and is capable to execute post extraction commands. So here's IEXPRESS sed-directive /.bat file that creates a self-extracting.exe with packed.bat. It accepts two arguments - the.bat file you want to convert and the target executable. Hold the Windows key and press S to open the Windows search feature. Search for Advanced BAT to EXE and open the application. Click on the File menu in the menu bar and choose the Open option. Select the batch script and click on the Open button.
However, in the new Google Drive, the option to bulk download your Google Docs files as PDFs is gone (instead, it just defaults to downloading them as Word files). You can still download Google Docs files as PDFs if you open them up individually -- but that's pretty time consuming if you have dozens of handouts to convert (as I do pretty much every semester).
For awhile, I got around this by switching back to the 'old' Google Drive whenever I wanted to do a conversion, but that option has now disappeared. There are other tools out there for bulk converting PDFs though, annoyingly, many of them (especially on Mac) don't retain hyperlinks.
Thankfully, there's a workaround that allows you to still use Google Drive to do your batch conversions: Google Takeout. Google Takeout is a service offered by Google that lets you essentially download all of your data from Google services -- emails, photos, documents -- into one massive ZIP file. But you can also use it to do a batch conversion on a single folder of documents.
First, check your Google Drive settings and make sure its set to convert uploads to Google Docs format (you can switch this back after).
Now create a new folder in Google Drive (like 'PDF Conversions') and upload all your Word files to that folder. If you want to convert files for multiple projects at the same time (like handouts for several different classes), just create subfolders within that one main folder.
Go to Google Takeout. By default, everything will be selected for download. You don't want this (it will take hours). Click on 'Select None' then scroll down to Google Drive and turn it on. Then, instead of downloading 'all files and folders', choose 'Select files and folders' and choose your 'PDF Conversions' folder. Then make sure that the file format for documents is set to 'PDF'.
Click Next. The defaults on the next page (ZIP file, email notification) are fine. Press Create archive.
You'll get a little status bar showing you how the conversion is coming along but you don't have to sit there and wait. Close your browser and you'll get an email when it's all done (depending on how many files you have, this may take a few minutes). Click on the link and then download the archive.
Batch File Extension
Open up the ZIP file and you should have all your PDFs -- with hyperlinks included -- inside. I've used this technique a few times -- including for dozens of Word files at a time -- and it seems to work great. The only minor bug I've noticed is that if your Word filename is longer than 90 characters (before the .docx), everything after 90 characters seems to get cut off.
Hope this workaround saves some other folks out there some time.
(For those wanting an even quicker, but much nerdier, solution, if you install LibreOffice you can use its command-line tools to batch convert DOCX files to PDF too. On first glance, it seems to handle some of the formatting a bit better than Google Drive. Thanks to Kevin McArthur for the suggestion.)
You may need to run a batch file to configure devices, delete or copy files, or perform other tasks each time the computer loads to help it run more efficiently or allow a device to run. Below are steps on how to make any batch file run each time you boot into Windows.
NoteIf there are two or more user accounts on the computer, the batch file runs after the user logs in to Windows.
Run a batch file at loading of Windows 8 and 10
- Create a shortcut to the batch file.
- Once the shortcut is created, right-click the shortcut file and select Cut.
- Press Start, type Run, and press Enter.
- In the Run window, type shell:startup to open the Startup folder.
- Once the Startup folder is opened, click the Home tab at the top of the folder. Then, select Paste to paste the shortcut file into the Startup folder.
Run a batch file at loading of Windows 98, XP, NT, 2000, Vista, and 7
- Create a shortcut to the batch file.
- Once the shortcut is created, right-click the shortcut file and select Cut.
- Click Start, then Programs or All Programs. Find the Startup folder and right-click that folder, then select Open.
- Once the Startup folder is opened, click Edit in the menu bar, then Paste to paste the shortcut file into the Startup folder. If you do not see the menu bar, press the Alt to make the menu bar visible.
Any shortcuts in the Startup folder automatically run each time the user logs in to Windows.
Run a batch file at loading of Windows 95, 3.x, and MS-DOS
The autoexec.bat file is in the root directory of the C: drive (C:autoexec.bat). Place a line in your autoexec.bat that calls the batch file each time you want to boot the computer, as shown below.
In the example above, each time your computer starts and processes the autoexec.bat file, it runs the batch file myfile.bat.
NoteThe autoexec.bat is only available with early versions of Windows and is not available or used in any version of Windows after Windows XP.
Additional information
Turn Batch File Into Exe
- See our batch file and startup folder for further information and related links.