0

After I have searched for files whose names meet certain criteria and which contain e.g. a given keyword, I can click on a button "Feed to listbox".

Then Krusader asks me for a name of this search result list which they call a virtual file system (VFS). By entering a name, I create such a VFS.

Then I can use the VFS like any other active panel, e.g. copy files from there or move them to some other location or delete them (in fact, deleting them from this list really deletes them from where they were found)!

After I have done some searches, quite some of such VFS have accumulated within Krusader. How can I get rid of the VFS without getting rid of the files contained in them?

Unfortunately Krusader's documentation does not tell anything about that!

2 Answers2

0

Page 36 of the Krusader Handbook is helpful

Actions you perform on the files in VFS are performed on the ’real’ files.

You do not just delete files from the VFS - you delete them from your hard drive.

So to make a copy

  • go to the virtual folder and select the files
  • select a destination folder (non virtual!)
  • press F5-> copy dialog appears
  • Check Keep virtual folder structure
  • Select /home/myhome/ for base URL
  • Start copy by pressing OK
Zanna
  • 70,465
F.A.
  • 1
  • When I press F5, my Krusader version 2.7.2 does not give me the option "Keep virtual folder structure". If I copy anyway, all files are copied flat to the selected destination folder, destroying the previous file structure of the source directory. By the way, what you describe looks quite cumbersome to me. - Did the developers of Krusader really forget that you also have to be able to delete such virtual folders without deleting their contents? They are intended to be just an additional access path to the contained information. – Adalbert Hanßen Apr 13 '23 at 20:27
0

When you feed search results to a listbox and close Krusader and then immediately apply the command

find . *.* -mtime -0,01 -type f -printf "%TY-%Tm-%TdT%TT %p\n" | sort -r | ssed -R 's/^([^.]+)\.\d+ (.*)$/\1 \2/'

you see which files have been modified during the last 1/4 hour or so. Investigating file modification dates you see, that these two files are modified by Krusader:

  1. ~/.config/krusaderrc
  2. ~/.local/share/krusader/virtualfilesystem.db

Both of them are printable. Both together keep record on what you did and find out with Krusader. The second file contains the VFS made by find operations followed by "Feed to listbox".

It looks like that one can manipulate both files with an editor or by a script. After deletion they are reconstructed when Krusader starts. However after deleting ~/.config/krusaderrc Krusader starts with the lengthy prologue as if it had been started for the first time.

This script deletes the database and copies a reset-version over ~/.config/krusaderrc:

#!/bin/bash
# ******************* ResetKrusader.sh *******************
# This script removes all vfs from Krusader.
# It deletes ~/.local/share/krusader/virtualfilesystem.db
# and it copies ~/.config/krusaderrc_reset to
#               ~/.config/krusaderrc
# The reset version can be obtained by deleting 
# ~/.config/krusaderrc, then starting Krusader and go 
# through the first steps of Krusader until it is in the 
# two-windows mode. Then leave Krusader.
# This way you get a new version of this file which
# has the two lines 
#
# [ViewerModule]
# FirstRun=false
#
# at its end such that Krusader can enter its normal work
# mode without the "first run" prologue when started.
# Just make a copy ~/.config/krusaderrc_reset of
# ~/.config/krusaderrc at this moment.
# ********************************************************
rm ~/.local/share/krusader/virtualfilesystem.db
rm ~/.config/krusaderrc
cp ~/.config/krusaderrc_reset ~/.config/krusaderrc

Just make a reset state version ~/.config/krusaderrc_reset-state as described in the comment inside the script.

I guess it would not be very difficult to add a housekeeping function about the memorized VFS to krusader itself letting one decide to delete one or the other memorized VFS. There doesn't seem to be much programming capacity behind this project, but actually Krusader is very useful!

On the other hand, the entry barrier is quite high to change the code of programs like Krusader by oneself and upload an improved proposal. I have failed so far to get something like this into the IDE Eclipse (not to mention all the difficulties that come afterwards!)