Removing useless files

The next problem was getting rid of all the files I didn't need any more because I cut them out: The shell was my friend in that case.

At first I needed a list with all files that were in use:

fgrep src kinoproject.smil | cut -b 17-63 > files_video

wrote all the filenames used in the project file into files_video. It could be that the "63" is different for you if the dvgrab filenames have another length.

The next was to get a list with all files not in the video:

ls -1 video/ | grep -v -f files_video > files_to_move

That one lists the files in video/ directory, one each line and compares them with the lines in the file created previously. The result is a list with all files not in the project.

Now all I had to do was moving the files to another directory:

for i in `cat files_to_move`; do mv video/$i /mnt/otherdrive/; done

You could delete the files here, too.