IDEA | How to import a Filelist from a text file

General discussion related to "Everything".
Post Reply
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

IDEA | How to import a Filelist from a text file

Post by Stamimail »

Assume you have a filelist in a TXT file like this:

D:\Folder
D:\Folder\File.txt
D:\Folder\EmptyFolder
D:\Folder\File

The problem:
void wrote:A flag is also used to determine if the item is a file or folder.

Differences between the exported formats:
EFU exports the full path and filename, a flag to determine if the item is a file or folder, size and date information.
CSV exports the text that is visible in the Everything result list.
TXT exports the full path and filename.

I'll consider adding the option to open file lists from with a csv extension that contain the Name and Path columns.
I'll consider adding the option to open file lists from with a txt extension.
With both of these types it will be difficult to determine if an item is a file or folder result.
I want to suggest 2 ways for solution:

1. At first I was thinking about this solution:
Everything will have a built-in icon - half_folder_half_file icon.
So that:

D:\Folder - system default folder icon (childs detected)
D:\Folder\File.txt - txt file icon
D:\Folder\EmptyFolder - half_folder_half_file icon
D:\Folder\File - half_folder_half_file icon

But I'm afraid there will still be a problem with this kind of folders:
D:\Folder\EmptyFol.der (this folder looks like a file)

So this method will be good only if the user will be aware that the results are approximate.


2. Using "\" at the end of a FolderPath like this:

D:\Folder\
D:\Folder\File.txt
D:\Folder\EmptyFolder\
D:\Folder\File

D:\Folder\EmptyFol.der\


For keeping this "syntax", Everything (or other apps) will use a new extension like ".flist" .
This way, when a user encounters this type of file, he knows that this file contains a file list that keeps this "syntax".

----------------------------

Correct me if I'm wrong,
There is no down side if Everything will use this "syntax" for:
Copy FullPath (Ctrl+Shift+C), and
Exporting to TXT.
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: IDEA | How to import a Filelist from a text file

Post by void »

Everything shouldn't guess if a filename is a folder or file, it will almost always get it wrong.

I like the idea of a trailing backslash (\) to indicate the filename is a folder, since currently, that produces a file with no name, which is not very useful at all...

For the next major version of Everything, I have added:
allow file lists to indicate folders with a trailing backslash.
support for omitting the Filename column header in efu files.

If the Filename column header is omitted, Everything will assume that each line contains a filename.
double quotes will be ignored. triple double quotes """ will be treated as a single double quote " for CSV backwards compatibility.
Correct me if I'm wrong,
There is no down side if Everything will use this "syntax" for:
Copy FullPath (Ctrl+Shift+C), and
Exporting to TXT.
Almost all paths in Windows exclude the trailing backslash (except for the root path c:\ )
Problems can arise when concatenating a filename to a path with a trailing backslash.
eg: C:\windows\ + notepad.exe could become c:\windows\\notepad.exe, which Windows does not handle.
Added to my TODO list: add an option to include a trailing backslash for directories when using copy as path and exporting to txt.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: IDEA | How to import a Filelist from a text file

Post by Stamimail »

Problems can arise when concatenating a filename to a path with a trailing backslash.
eg: C:\windows\ + notepad.exe could become c:\windows\\notepad.exe, which Windows does not handle.
This specific example works for me.
Tested on CMD and Start.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: IDEA | How to import a Filelist from a text file

Post by NotNull »

It works on a lot of places (I rely on that quite heavily). Explorer (shell) handles that correctly.
Exceptions: File Explorer (address bar) and 2 or 3 places where I was really surprised that it didn't work (but can't remember them)


Quick tip regarding the File Explorer address bar:
If you want to open - let's say - CMD or Powershell in the currently active Explorer folder: go to the address bar, type CMD (+Enter) and there you are.
Stamimail
Posts: 1122
Joined: Sat Aug 31, 2013 9:05 pm

Re: IDEA | How to import a Filelist from a text file

Post by Stamimail »

NotNull wrote:Quick tip regarding the File Explorer address bar:
If you want to open - let's say - CMD or Powershell in the currently active Explorer folder: go to the address bar, type CMD (+Enter) and there you are.
Nice Tip. Thank You. I used always the Shift+RightClick for that.
Post Reply