Smidge146 Posted June 24, 2008 Posted June 24, 2008 So I made a batch file which would the user would pick a game from a list and then inside the game directory a file known as a tga would be deleted and Now I just need to know how I would do it in autoit? This the batch file: CODE@echo off title Tga delete :start cls echo ----------- echo Tga delete echo ----------- echo This program deletes Tgas, wavs and dem files echo which have been left over using source recorder. echo ------------------------------------------------ Echo Enter your steam username: set /p user= cls echo ----------- echo Tga delete echo ----------- Echo Hey %user% Choose a game echo ------------------------------------------------ echo 1.Team fortress 2 echo 2.Counter-strike:source echo 3.Garrys mod echo 4.Half-life 2 echo 5.Half-life 2 episode 1 echo 6.Half-life 2 episode 2 echo 7.Half-life 2 death match echo 8.Day of defeat:source echo 9.A source mod set /p game=selection(number): if "%game%" == "1" goto tf2 if "%game%" == "2" goto css if "%game%" == "3" goto gmod if "%game%" == "4" goto hl2 if "%game%" == "5" goto hl2ep1 if "%game%" == "6" goto hl2ep2 if "%game%" == "7" goto hl2dm If "%game%" == "8" goto dod if "%game%" == "9" goto sm if "%game%" == "" goto error )else( goto error :tf2 cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\team fortress 2\tf if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :css cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\counter-strike source\cstrike if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :gmod cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\garrysmod\garrysmod if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :hl2 cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\half-life 2\hl2 if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :hl2ep1 cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\half-life 2 episode one\episodic if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :hl2ep2 cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\half-life 2 episode one\episodic if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :hl2dm cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\half-life 2 deathmatch\hl2 if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :dod cls cd C:\Program Files\Valve\Steam\SteamApps\"%user%"\day of defeat source\dod if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :sm cls echo Type in the source mod folder name: set /p Sourcem=name: cd C:\Program Files\Valve\Steam\SteamApps\SourceMods\"%sourcem%" if exist *.tga del *.tga if exist *.wav del *.wav if exist *.dem del *.dem cls goto done :done echo Done! Echo Thank you for using this program echo -------------------------------- echo Copyright © 2008 Elliott Coe echo ------------------------------------------------------ Echo press (E + Enter) to exit or (A + enter) to do it again... set /p exit= if "%exit%" == "e" exit if "%exit%" == "a" goto start :error cls Echo ERROR! Echo Make sure you chose an option! pause cls goto start
Zedna Posted June 24, 2008 Posted June 24, 2008 Look into AutoIt helpfile at: _FileListToArray() FileDelete() Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now