Home / Blog / January 05, 2024

BATCH SCRIPTS FOR DIGITAL ARTISTS


I will preface this blog entry by making it clear that I am not the most technologically literate person on the planet, sorry in advance! And this is for Windows. I'm not sure if this can be adapted for Mac.

One of the biggest hurdles I have with working on my comic is actually sitting down and opening all the files I need. That sounds stupid, but it's true - it's like when you won't get up and cook dinner because your dishes are dirty. I wish there was a button that you could press to magically clean all your dishes... if only. But rejoyce, digital comic artist, for there is a way to magically press a button and open all the apps, folders, and files that you need to speed up your workflow!

The way to do this is with a batch script and a shortcut, and requires minimal computer know-how. You can even customize the icon and put it on your taskbar!

1. Make the BATCH script

A batch script is just a plain text file that executes a series of commands on your computer. First open up a text editor like notepad - don't use something complicated like Word, just a plain text editor will do. This is going to become the batch file later, and will contain all the commands that you want to end up using.

Start the file off with:

@ECHO OFF

This command makes sure that the commandline window doesn't open when running the batch file and is purely cosmetic. If you want the commandline window to remain open for whatever reason, just leave this line out.

Next we want to navigate to the project folder that we're using. To do so, we add the following line, "cd" followed by the path of your folder. To find the path, navigate to your folder and click on this top bar. You can then copy and paste this in between the quote marks.

cd "path"

For example, mine looks like this:

cd "C:\Users\runet\Desktop\ART\PROJECTS\COMIC\"

Once we're in our folder, we can start opening files as long as they are in that same folder. I personally use a "base" file called "base.mdp" that contains my current WIP comic pages and templates that help me speed up page production, so I definitely want that open. I also list all of the pages I'm working on in an excel file, so I want that open to reference. Lastly, I want to open a document containing my script. To open all these files simultaneously is as simple as:

start Base.mdp
start comic_episodes.xlsx
start comic_script.txt

What if you want to open multiple files that aren't all in the same folder? Easy, just change the path to include the whole thing. For example:

start "C:\Users\runet\Desktop\ART\PROJECTS\COMIC\Base.mdp"
start "C:\Users\runet\Documents\RandomFolder\randomfile.txt"
start "C:\Users\runet\GiantScaryCave\CreepyTomb\EvilFile.png"

But what if you want to open an app without opening a specific file? Easy, just change the path in the line below:

start "" "C:\Users\runet\Desktop\WhateverFolders\program.exe"

I also want to open a series of websites so that I can upload finished pages online. Surely this is complicated? Nope! Just use "start" and then the URL of the website page you want to navigate to.

start https://www.webtoons.com/en/
start https://tapas.io/

The last thing I do is open Windows explorer so I can view the contents of the project folder. Just change the path to whatever folder you want to open.

start %SystemRoot%\explorer.exe "C:\Users\runet\Desktop\ART\PROJECTS\COMIC\"

Our batch file is now done. Here's my complete version below. It navigates to my project folder, opens all the files I need, and then opens the folder itself. Easy peasy!

@ECHO OFF
cd "C:\Users\runet\Desktop\ART\PROJECTS\COMIC\"
start Base.mdp
start comic_episodes.xlsx
start comic_script.txt
start https://www.webtoons.com/en/
start https://tapas.io/ start %SystemRoot%\explorer.exe "C:\Users\runet\Desktop\ART\PROJECTS\COMIC\"

Now save the file as a text (.txt) file, then change the extention to .bat instead of .txt. There's our batch file done!

We're almost done - we now have a functional "program" that opens everything we want when we click on it! But we can do more - by making a shortcut, we can customize the icon of the file, and add it to the taskbar.

2. Create a shortcut

Stow that batch file away somewhere safe where you know it won't get moved, deleted, etc. For example, I keep mine in the project folder of the comic project that its for.

Right click the batch file and hit "create shortcut". Right click the shortcut and select "propterties", and navigate to the "shortcut" tab in the properties pop-up window.

In the text box next to "Target" add the following phrase before the phrase that's already in there.

C:\Windows\System32\cmd.exe /C

This change will allow the shortcut we just made to do two new things. One, we can now put the shortcut on the taskbar. Two, it lets us set a custom icon!

Before you hit "apply" and close out of this window, the last thing to do is change the "Run" setting to "Minimized". This will keep the commandline window out of sight while the code is running.

At this stage you can move the shortcut file to wherever you want to use it. For example the desktop, documents, or any other folder. You can also click and drag the shortcut onto your taskbar to pin it there.

3. Customize your icon

The default icon for this shortcut isn't the prettiest. We can change that pretty easily! To do so, create a square icon image for your shortcut - you're a digital artist, I presume, so you know how! Keep in mind that it will display for the desktop image and for the taskbar image, so you want it to be readable at a small size. Draw at whatever size you like, but convert to 64x64 pixels when you're done. Once you've created and saved your image, use an online converter to change whatever file format you saved it as to a ".ico" file.

Save this .ico file somewhere special (perhaps where you have put the batch file and shortcut file?). Go back to your shortcut, right click, select properties, navigate to the shortcut tab again, and select "Change Icon". From here you can select the .ico file that you made. Voila!

You might have to re-pin the shortcut to your task bar to make the icon change show up.

↜ Back 2 the Blog