| 1. |
Solve : How to "uninstall" files extracted from an archive?? |
|
Answer» You are right: In the batch file I didn't type the brackets, quotes, grave accents (what you call "single apostrophes"?), nor I typed "type ". C:\My Games\Bethesda Softworks\Oblivion>FOR /F "usebackq delims=" %i IN (`type " It is in portuguese. I'll translate: "O sistema não conseguiu localizar o ficheiro especificado." means "The system couldn't locate the specified file". "Não foi possível localizar..." means "It wasn't possible to locate...". Like I said, even if the PC couldn't delete the files containing spaces in their path or filename, some of the above errors still don't make sense to me. For instance: Quote Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Bash.htmlThose files don't exist in the Oblivion folder, nor they are listed in Wrye_Bash_190.txt, so they shouldn't be traced for deletion! It seems they were "invented"? Quote Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\PatchIn the Oblivion folder there isn't any file or folder starting with the word Patch. Also none of the file paths listed in Wrye_Bash_190.txt start with "Patch", they all start instead with "Data\" or "Mopy\"! I don't understand this! oh I forgot something else. try it again, but instead of @echo %%i or @del %%i, put %%i in quotes, as in @del "%%i"That's it! Finally it worked. Thanks again. One more thing. About this other batch file you posted on reply #4 to create a list of the files in the ZIP: Code: [Select]@echo off dir /b > listing.txt It would not have worked. I tried to run it in a new folder where I extracted the zip archive just to see if it created a list of the files within the archive without listing the folders too, so that I wouldn't have to delete the folders manually from the list. It generated this list: Quote Datayeah- at the time I created that I was unaware that there were subfolders. please disregard that batch file. for the curious I would guess the proper one would be: Code: [Select]@echo off dir /a-d /s /b > listing.txt Quote from: BC_Programmer on April 12, 2009, 08:00:45 PM Can't you delete files modified on a certain date with a for LOOP, if so, you can find out one file that you know is DEFINATLY a Wyre Bash file, and get the date created...and what about updates to the original oblivion game? or unrelated files. Or of course the fact that ZIP files preserve the original value of Date created. I just unzipped a old zip file, and the created dates on the files were still 2000.Quote from: BC_Programmer on April 13, 2009, 06:54:24 PM for the curious I would guess the proper one would be: No, this one won't do what's expected either. I extracted the zip archive Wrye Bash 190.zip to this temporary directory: D:\Os meus jogos\The Elder Scrolls IV - Oblivion\Wrye Bash\Wrye Bash 190\ Then, placed there the batch file you suggested (I saved it as Wrye_Bash_190.bat) and ran it. It produces a list of the files contained in the archive, but the problem is that the pathes of the files that are listed include the path of the temporary folder where the archive was extracted, which is not intended. For instance, it lists: Quote D:\Os meus jogos\The Elder Scrolls IV - Oblivion\Wrye Bash\Wrye Bash 190\Data\Bash Patches\Bash_Groups.csv Where it should be listing: Code: [Select]Data\Bash Patches\Bash_Groups.csv Data\Bash Patches\Bash_MFact.csv [...] Of course, it also lists: Quote D:\Os meus jogos\The Elder Scrolls IV - Oblivion\Wrye Bash\Wrye Bash 190\Wrye_Bash_190.batThose two are not a problem, though. They could easily be manually deleted, or rather they could be left in the list. That way, as LONG as the second batch file (the one that will uninstall the WB files in the Oblivion directory) is named with exactly the same name as this one, then Wrye_Bash_190.bat and listing.txt will both be automatically removed along with the WB files from the Oblivion directory, which is fine. |
|