This is a simple python script which lets you quickly rename all the DCS control files whenever you have re-installed windows.
When you reinstall windows the ids your controllers will be given will be DCS and therefore DCS will not recognise your controls. This script lets your rename the old ones to be the same as the new ones allowing you to use them again without having to import them one by one.
- DCS Keybinds Manager which uses Autohotkey
- This tutorial by HavocCompanyClan which uses bulkrenameutility
Python is required you can get it here: https://www.python.org/downloads/
IMPORTANT during the python install it will have the option Add Python 3.x to PATH make sure you SELECT this option so we can run the python command from the command prompt later.
Find your saved games this is usually C:\Users\your pc name\Saved Games
Make a backup of your Saved Games/DCS folder just in case.
Put this script in Saved Games/DCS/Config/Input
Go to Saved Games DCS/Config/Input/[aircraft of your choice]/joystick
There you will see some controls
There may be multiple with the same name but different ID so you likely want to choose the ones with the last modified.
Copy the names for your files like so
In the python script there is a controllers variable you can edit this to add the old control file names for now leave the new ids blank.
controllers = {
# OLD_NAME : NEW_NAME
"Flight Control Rudder {021095E0-5D58-11ed-8007-444553540000}.diff" : "",
"RIGHT VPC Stick MT-50CM2 {0210BCF0-5D58-11ed-800A-444553540000}.diff" : "",
"VPC Throttle MT-50CM3 {021047C0-5D58-11ed-8003-444553540000}.diff" : "",
}You can add as many as you require just make sure there is a comma between lines.
Open DCS and go to the controls for the aircraft we got the old control names from, then make a keybind on each one of your controllers and save.
This will generate the new files like so
we then need to repeat the process for the new files but instead putting them next to their corresponding old file.
controllers = {
# OLD_NAME : NEW_NAME
"Flight Control Rudder {021095E0-5D58-11ed-8007-444553540000}.diff" : "Flight Control Rudder {A12CEA40-4535-11ea-8001-444553540000}.diff",
"RIGHT VPC Stick MT-50CM2 {0210BCF0-5D58-11ed-800A-444553540000}.diff" : "RIGHT VPC Stick MT-50CM {5DF754D0-B241-11ea-8003-444553540000}.diff",
"VPC Throttle MT-50CM3 {021047C0-5D58-11ed-8003-444553540000}.diff" : "VPC Throttle MT-50CM3 {BBCBD090-048B-11e5-8001-444553540000}.diff",
}We must delete the files just created by DCS because the script will want to rename the old files to the same name so we simply delete
Flight Control Rudder {A12CEA40-4535-11ea-8001-444553540000}.diff.lua
RIGHT VPC Stick MT-50CM {5DF754D0-B241-11ea-8003-444553540000}.diff.lua
VPC Throttle MT-50CM3 {BBCBD090-048B-11e5-8001-444553540000}.diff.luain our example.
First we need to open a command prompt in the correct location. Navigate to your Saved Games/DCS/Config/Input. Then highlight the current directory at the top in your windows explorer like so
with it highlighted type cmd and hit enter on your keyboard.
This will open a command prompt at the folder you are in.
Then to run the script we can first do a dry run with the command:
python fix.py
check the output to see if it matches your expectations.
Then you can do it for real with:
python fix.py --rename
If you wish to undo you can reverse the process:
python fix.py --rename --undo
Load into DCS and check your controls. If something went wrong check there were no errors you can either run the undo command or replace with the backup you created at the start and try again.
You can uninstall python now from your PC if you don't need it.






