Bridge Commander Central
BC Forums => BC General => Topic started by: CaptainRussell on April 09, 2008, 11:34:12 PM
-
Could some one tell me how to make a batch file that will delete the following directories:
"scripts/Tactical/Projectiles"
"scripts/ships"
"scripts/Maelstrom"
"data/Models/Ships"
"data/Models/SharedTextures"
"data/Models/Bases"
"data/Models/Misc"
"data/Icons/Ships"
"sfx/Explosions"
"sfx/Weapons"
Your help would be greatly appreciated as I have not been able to find a decent batch file tutorial.
Thanks!
-CR
-
/? is all the tutorials you need. ;)
If you place this in your BC directory, then it ought to work, not sure though.
del .\scripts\Tactical\Projectiles
del .\scripts\ships
del .\scripts\Maelstrom
del .\data\Models\Ships
del .\data\Models\SharedTextures
del .\data\Models\Bases
del .\data\Icons\Ships
del .\sfx\Explosions
del .\sfx\Weapons
What are you trying to do anyway?
-
somehow methinks it has to do with BC SuperMod 3.0 ;)
-
Thanks MLeo; I'll try that.
Jimmy, you get a cookie.
-CR
-
cookie right back at ya - i know how hard youve been working on it :)
-
Well that didn't work; people are going to have to delete about ten folders from their fresh BC installation - I have already prepared a pictorial instruction reference so it should not be very difficult.
I know how to make the batch file that could do this, but the user would have to press "y" and "Enter" about 1000 times to get through the damn thing - I think it would be easier for them to just delete the folders manually.
-CR
-
Have you tried adding /Q and /F just after each path?
-
Nevermind I looked up those commands on a tutorial.
MLeo, I think that it should go something like this:
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\data\Models\Ships
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\data\Models\Bases
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\data\Models\SharedTextures
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\data\Models\Misc
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\data\Icons\Ships
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\scripts\Tactical\Projectiles
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\scripts\Ships
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\scripts\Maelstrom
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\sfx\Weapons
rmdir /S /Q C:\Program Files\Activision\Bridge Commander\sfx\Explosions
A good site said that /Q will prevent the question prompt, and /S will remove all files, subdirectories, and subdirectory files; I'm at school right now so I won't be able to find out if the above code works for several hours. :(
Thanks though.
-CR
-
You will need to put "" around the path, since it contains spaces.
The . means "current directory" (.. would mean parent directory).
So, changing the working directory to the BC install would make the above valid, to an extend, rmdir could also work.
rmdir does seem to be a better candidate instead of del for this job.
-
Thanks I was not sure about spaces in DOS as far as folders are concerned; so it should go like this:
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\data\Models\Ships"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\data\Models\Bases"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\data\Models\SharedTextures"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\data\Models\Misc"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\data\Icons\Ships"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\scripts\Tactical\Projectiles"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\scripts\Ships"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\scripts\Maelstrom"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\sfx\Weapons"
rmdir /S /Q "C:\Program Files\Activision\Bridge Commander\sfx\Explosions"
-
Seems alright so far, except for the hardcoded assumption that everyone installs in C:\Program Files\. :P
The only programs that are installed there are programs that are stupid and don't allow anything else. Such as Borland JBuilder which also doesn't want spaces in the installation path. :P
-
I'll just have the user paste the BAT into their "Bridge Commander" folder then, and delete the "C:/Program Files/Activision/Bridge Commander" part off of each of the above remove directory codes.
-CR
-
Don't forget to add the dot! ;)
But if you are going with an installer, then why not do it for them?
-
I think some of the newer install builder tools allow you to remove existing files/folders if they already exist.
This would probably be a cleaner approach than running a batch file.