Reinstalled Win7 Now .bat files won't work proper

Apr 8, 2018
1
0
10
Required to have Windows 7 reinstalled on laptop. As I reset it back up, my .bat file no longer seems to work like before. The following code:

@echo off
echo %date% %time% >> "E:\transfered-log.txt"
echo.>> "E:\transfered-log.txt"
echo.>> "E:\transfered-log.txt"
dir "C:\Users\Mark\Videos\Any Video Converter Ultimate\MP4" >> "E:\transfered-log.txt"
echo.>> "E:\transfered-log.txt"
echo = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = >> "E:\transfered-log.txt"
echo.>> "E:\transfered-log.txt"
move "C:\Users\Mark\Videos\Any Video Converter Ultimate\MP4\*.*" "E:\MP4\transfered"
exit

simply gave me a record of what I transfered when then transfered the files to another drive so the C: drive didn't fill up.

The resulting error is 'movesFiles.bat' is not recognised as an internal or external command, operable program or batch file.

I have tried using cmd.exe and even installed cmder.exe from github both with the same results.

Any advice would be grateful. TIA
 
Solution
Here's a couple of things you could try;

1. Rename the file movesfiles.cmd and try it.

2. Check this registry key: Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat

If there is a value called UserChoice, remove it.

DISCLAIMER: Before making changes to your registry you should back it up first. If you are not familiar with editing the registry, be careful, you can cause problems if you mess it up.


Tanyac

Reputable
Here's a couple of things you could try;

1. Rename the file movesfiles.cmd and try it.

2. Check this registry key: Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bat

If there is a value called UserChoice, remove it.

DISCLAIMER: Before making changes to your registry you should back it up first. If you are not familiar with editing the registry, be careful, you can cause problems if you mess it up.


 
Solution
If you only need to reset the file association of a single file type, then it's easiest to use one of Doug Knox's file association registry fixes, in this case for batch files. Create a new blank notepad .txt document and paste this into it:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.bat]
@="batfile"

[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00

[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,35,\
00,33,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell]

[HKEY_CLASSES_ROOT\batfile\shell\edit]

[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
00

[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\batfile\shell\print]

[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\batfile\shellex]

[HKEY_CLASSES_ROOT\batfile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"
Save it and then rename it into a .reg file (accept the change in extension type). Double-clicking on that will then merge the contents with your registry. After a reboot everything should work again.