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 ".
I then edited the batch file: I simply replaced all the text in it by this one:

Code: [Select]FOR /F "usebackq delims=" %%i IN (`type "Wrye_Bash_190.txt"`) DO @echo %%i
I then ran the batch file. The command prompt window displayed a list of files which seemed correct, and matching those in Wrye_Bash_190.txt. Then, replaced in the batch file @echo by @del according to your instructions, and ran the new batch. The result was that some expected files were deleted, but most others were not. It seems that all the files which path or filename contained any spaces were not deleted, only the files which path and filename didn't contain spaces at all, were deleted. But even considering this interpretation, some of the error lines displayed in the command prompt window when I ran the batch still don't make sense to me. Here are the error messages:

Quote

C:\My Games\Bethesda Softworks\Oblivion>FOR /F "usebackq delims=" %i IN (`type "
Wrye_Bash_190.txt"`) DO @del %i
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Data\Docs\Bas
h
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Readme
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Data\Docs\Bas
h
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Readme
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Data\Docs\Bas
hed
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Lists.html
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Data\Docs\Bas
hed
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Lists.txt
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
O sistema não conseguiu localizar o ficheiro especificado.
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Mopy\Extras\B
ashed
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Patch
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Mopy\Wrye
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Bash
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Mopy\Wrye
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Bash
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Mopy\Wrye
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Bash.html
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Mopy\Wrye
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Bash.txt

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.html
Não foi possível localizar C:\My Games\Bethesda Softworks\Oblivion\Bash.txt
Those 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\Patch
In 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
Data
Mopy
Wrye_Bash_190.bat
listing.txt
yeah- 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

I forgot the percent signs- but you didn't copy it with the single apostrophes and such.


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:

Code: [Select]@echo off
dir /a-d /s /b > listing.txt

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
D:\Os meus jogos\The Elder Scrolls IV - Oblivion\Wrye Bash\Wrye Bash 190\Data\Bash Patches\Bash_MFact.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.bat
D:\Os meus jogos\The Elder Scrolls IV - Oblivion\Wrye Bash\Wrye Bash 190\listing.txt
Those 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.


Discussion

No Comment Found