Today I want to learn you “How-To” run files with a sham extension via batch script, for example you can change a text file extension to whatever you want, then run it properly!
Note: The good point of this way is that the new extension won’t be changed at all. for example if you change .txt to .mpf , after running this code the extension will be .mpf without changing and you have your text file ran.
Now Think you have Me.txt, now you change its extension to mjk, then you have Me.mjk that won’t be run at all. Here is the code to run such files:
Start “” “Path\File.ext”
Note: Do not change the format of this code, it should be like this.
Note: Replace “ext” with your own extension of your file, for example mpf. It can be more than 3 digits too.
Note: Replace “win” with a know extension in windows. for example txt or exe or cmd etc.
I have a text file which is located in C:\Info\, the filename is Majid.txt, Now I want to change its extension to mpf (majid pasha faghani), then I have Majid.mpf, Now I can not run it 🙁 So I should try my code in scripts 🙂
Start “” “C:\Info\Majid.mpf”
Now I can run my text file without changing its extension to .txt again. and as I told it before in Note1 it is the good point of this way or trick.
Thanks for reading this “How-To”