# Solved: Batch script help with file extensions



## cronin4392 (Mar 18, 2008)

I am making a batch file that moves an .exe file. whenever it moves the file the extension(.exe) gets removed and the file type is just "file". this doesnt happen with regular files like .txt .jpg ....


----------



## devil_himself (Apr 7, 2007)

i don't quite understand what you need. do you need a script to move certain file types ?



> I am making a batch file that moves an .exe file. whenever it moves the file the extension(.exe) gets removed and the file type is just "file"


i have never seen this happening.


----------



## cronin4392 (Mar 18, 2008)

yea the problem was a misplaced some quotes in a variable. i figured it out, but thanks.


----------



## tonyvign (Jun 30, 2008)

Windows Explorer does not show the 'exe' extension unless you set the option. Open Windows Explorer and Click Tools: Folder Options. Under the 'View" tab, the option is called "Hide extensions for know file types". If you want to see the extensions for all files, check this box.


----------



## MikeSwim07 (Apr 28, 2007)

I think he wants a a batch file to remove the extension of exe files. So even if the file extensions were shown through folder options this:

"random.exe" would turn into "random" with his batch file. Basically making any exe un-runable unless you add back the extension.


----------



## cronin4392 (Mar 18, 2008)

no i got the problem fixed, my problem was basically the exact opposite. my batch script would remove the .exe from files when moved.


----------

