uninstalling Daz asset's

xht_002

Member
Sep 25, 2018
342
352
a quick and painful way to remove all the junk files from manually installed asset's, if you still have the downloaded asset's archive to use as a blueprint for the files which need to be deleted :

first up you need to create a .bat [batch] file, and save it in the windows directory called filelist.bat with the following inside :

Code:
cd %1

set "yourDir=%1"

dir /s /b /o:g %yourDir%  > filelisting.txt
filelisting.txt
cd ..

pause
then you need to add a new context menu entry to the [ folder directory ] entry in the registry so you can right click on a folder and create a directory structure filelist.txt, using the .bat file saved in the windows directory, there is a tutorial or if you are willing you can download a .reg file which will add "Create File List" to the right click menu, for folder's > otherwise you can create a .reg file yourself in notepad with the following inside :

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\Create File List]
@="Create File List"

[HKEY_CLASSES_ROOT\Folder\shell\Create File List\command]
@="\"C:\\Windows\\filelist.bat\" \"%1\""
after you have completed all of that, you need to create a filelist.txt of the asset you want to remove from your library, when you open the filelist.txt in notepad, you need to use search and replace

so file lines like :

M:\path_to_daz3d_library\Runtime\Props\Marshian\Heavy Rain\3Delight\HR Rain Planes 3DL.duf.png

become

del /q "%yourDir%Runtime\Props\Marshian\Heavy Rain\3Delight\HR Rain Planes 3DL.duf.png"

so once that is done, you can create a asset delete .bat [ batch ] file and save it into your Daz3d library folder, containing the following :

Code:
cd /D "%~dp0"

set "yourDir=%~dp0"

echo 'working dir %yourDir%'

#paste full file list below
del /q "%yourDir%Runtime\Props\Marshian\Heavy Rain\3Delight\HR Rain Planes 3DL.duf.png"

cd ..

pause
there is no way to remove empty folder's, beside's using another program to search for empty folder's as different asset's use the same creator's folder name, and you will end up removing other asset's if you us rmdir inside a .bat file
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,108
14,776
Alright, I'm really new at Daz3D, so I surely miss something... but what are you trying to do exactly here ?
As I understand it, you unzip the original archive, list it's content, edit the list, then copy/paste it into a batch file that will delete every files for you... So, my question is : Isn't the time needed to do this higher than the time needed to find the right directories and directly deleting them ?

Anyway, you can use dir /S /B /A:D instead of dir /s /b /o:g. It will only list the directories. It will lead to a lower number of lines in the file. Then, use both del /F /S /Q instead of del /q, and your brain to discriminate the lines that need to be kept.
It will delete everything in the directory, recursively and without asking anything, so just keep the ones directly related to the asset you want to remove. By example, you will have something like :
[...]\Runtime
[...]\Runtime\Textures
[...]\Runtime\Textures\3DSSilver
[...]\Runtime\Textures\3DSSilver\Thana
Only the last one is directly related to the asset and must be deleted.

It still need more time than manually search for the right directories, but at least it need less works.
 

xht_002

Member
Sep 25, 2018
342
352
Alright, I'm really new at Daz3D, so I surely miss something... but what are you trying to do exactly here ?
As I understand it, you unzip the original archive, list it's content, edit the list, then copy/paste it into a batch file that will delete every files for you... So, my question is : Isn't the time needed to do this higher than the time needed to find the right directories and directly deleting them ?

Anyway, you can use dir /S /B /A:D instead of dir /s /b /o:g. It will only list the directories. It will lead to a lower number of lines in the file. Then, use both del /F /S /Q instead of del /q, and your brain to discriminate the lines that need to be kept.
It will delete everything in the directory, recursively and without asking anything, so just keep the ones directly related to the asset you want to remove. By example, you will have something like :

Only the last one is directly related to the asset and must be deleted.

It still need more time than manually search for the right directories, but at least it need less works.
no, like I say on the last line, creator's use the same directories for different asset's, so the only way to remove seperate asset's is to delete files and not directories

-EDIT

if you have multiple asset's from the same creator like dforce, the safest way to uninstall a single asset is to delete the file's and not directories