Clean unused sound with big number of files

Problem: when folders with audio and text materials contains big number of files (>100 000)

  • application can’t read whole content of this folder
  • server stops to serve other clients when somebody tries to read content

As result, DJin.exe can’t clean unused material.

This topic contains instruction how to resolve this situation and clean unused files to reduce it’s count.

Warning! This is kind of trick, use a special DJin workplace to do it and do only described steps on it.

Read the folders content

There is simple application [raw-CountFiles.exe CountFiles], that read content of one folder, without subfolders, and stores file list with information as text file.
Run this directly on the host, that controls file storage with files.
Read content of folder, that DJin use to store (and clean) files (see Global settings AudioStorage and DB Storage tabs to determine path to these folders).

Do the following: Copy [raw-CountFiles.exe] directly to host, that controls file storage. Specify local path to DJin storage folder (not UNC network name), as in example

src=d:\ROOT\storage\news\*.* dst=d:\content_of_sorage_news.txt Q=1000 T=1000
  • SRC - path to folder with big number of file to read
  • DST - name of text file to store result
  • Q - number of sequentially enumerated files
  • T - timeout between file groups to give server a rest (milliseconds)

Program will print statistics every Q files.
Program should ends without text FAIL on screen. If program fails - found a reason and run program again.

Repeat it for every folder with big number of files, use different result files for each folder. If it will be to hard for servers - set less Q.

So, now you has read content all storage folders an keep it in set of text files.

Run cleaning

Note. All text files, described here, are in ANSI encoding, not unicode

  1. Choice a DJin workplace, that will be used to clean material. It should be configured as normal workplace in your system (Root and DB connection should be set and accessible).
  2. Shutdown DJin.
  3. Create folder with name $FILES in same folder with DJin.exe
  1. Create file with name $ in this folder
  1. Create its content as the following:
... and all other folders...
  1. Run DJin.exe and clean unused material
    1. You must get error messages (red lamp will flash), started with "File content found" (and information from line of $ file). It’s not a error, it’s a sign that $ file is read.
      You must get one message for one line of file $. You can control it in debug log.
    2. Clean material as usual. Be carefull, as usual.
  2. Shutdown DJin.exe
  3. Delete folder $FILES

Add picture from clipboard (Maximum size: 742 MB)