You will get a beep if you have not selected at least one file or if you are trying to run the script from a place where DOS does not work - like inside Archives, FTP sites or Virtual panels. It works with Unicode file names, and for hidden and system files - BUT the hidden/system file attributes will be removed.

Hmm..I could not get this to work. I copied the code, and right click at the menubar and press paste. it created the button but when i select the files and pressed it, it run the batch file but did not change any filenames.

Hmm, it works OK here Both under WIndows 7 and 10. Are you running the script on a network share? - it might not work there.

BTW - if you get it to work, and you don't want to see the DOS window popping up use this in stead:

You will get a beep if you have not selected at least one file or if you are trying to run the script from a place where DOS does not work - like inside Archives, FTP sites or Virtual panels. It works with Unicode file names, and for hidden and system files - BUT the hidden/system file attributes will be removed.

Hmm..I could not get this to work. I copied the code, and right click at the menubar and press paste. it created the button but when i select the files and pressed it, it run the batch file but did not change any filenames.

Thanks Stefan and Roman for the help. I am using 9.21a x64 if that matters. I am going to reinstall AHK tomorrow and see if this helps. I will sign off now to get some sleep and will try again tomorrow. I am still dead keen to resolve this one.

The first part is to test that you are on a drive that DOS can handle, the second part is to test that at least one file is actually selected (not just the with the cursor on it) or if the cursor is on a folder. Apparently your OS's cannot handle the echo• which at my systems gives me a beep sound.

The reason for the message is a missing space after echo. But if you try the button in a panel that shows a normal harddisk folder, and if at least one file is selected - the the echo command should not be executed at all.

Maybe there is a Registry setting for cmd.exe that prevents it from handling control characters - but I haven't made any changes to my system for cmd.exe.

Please try either this in a normal harddisk folder (USB drive with drive letter will also do) with at least one selected file, and with no selected file (should give beep):

The first part is to test that you are on a drive that DOS can handle, the second part is to test that at least one file is actually selected (not just the with the cursor on it) or if the cursor is on a folder. Apparently your OS's cannot handle the echo• which at my systems gives me a beep sound.

The reason for the message is a missing space after echo. But if you try the button in a panel that shows a normal harddisk folder, and if at least one file is selected - the the echo command should not be executed at all.

Maybe there is a Registry setting for cmd.exe that prevents it from handling control characters - but I haven't made any changes to my system for cmd.exe.

Please try either this in a normal harddisk folder (USB drive with drive letter will also do) with at least one selected file, and with no selected file (should give beep):

That way the computer should make beep using internal PC speaker, but in modern computers it is usually redirected to the sound card, so beep may depend on bios settings, sound card drivers and sound (mixer) settings. Do you use both systems on the same PC? PC speaker as a legacy device might be turned off by default when Microsoft changed mixer in Windows 10, but it should be possible to enable Win7 mixer, see search results:https://www.google.com/search?q+sound+mixer+in+windows+10

I checked a bit more. If I execute echo • in a DOS console under Windows XP and Window 7 I get a generic beep sound. If I do it in Windows 8.1 I get the sound that is assigned for Windows' "Critical error". In windows 10 the • is displayed in the DOS console, but if I redirect to console with: "echo • > con" I get the same sound as in Windows 8.1.

If I use %COMSPEC% /K in the button and echo • > con - I do get the beep when using the button under Windows 8.1 and 10, but if I use %COMSPEC% /C I don't get the beep - apparently the DOS console is closed before the beep is carried out (maybe because my windows 8.1 and 10 computers are slow).

But no matter what, the echo • should not matter if the condition that should trigger it is not met - that is we are on a DOS supported drive and there is at least one file selected, then the two first if's are false and the files should be renamed. Anyway that is what I experience under Windows 10.