Feed list of files to listbox from text file

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Tim58
Junior Member
Junior Member
Posts: 12
Joined: 2009-02-09, 13:08 UTC

Feed list of files to listbox from text file

Post by *Tim58 »

I have a text file containing a list of 635 filenames with their paths to multiple levels of subdirectories on the same drive. I would like to take the contents of this text file and dump it into the Listbox. From there I would like to copy those files and the directory structure to another medium (a USB stick in this case).

The reason I want to do this is these files are active files on a site, and I need to do mass conversion on them. There are thousands of other files that are either orphans or left-overs... that I don't want. I only want those listed in my text file.

Thanks for any ideas.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

- Remove the drive letter from the list, so that the list contains only relative paths like:
directory1\directory2\filename1.ext
...
- Open the root directory of the drive
- Mark all folder which are mentioned in the first directory level of your list
- Press <Ctrl+Shift+B> to get a branch view of the selected folders
- "Mark -> Load Selection from File" and select your list file
- "Show ->only selected Files"
- Use a packer plugin like TreeCopy or CopyTree ( http://www.totalcmd.net/directory/packer.html ) to copy (<Alt+F5>) the selected files to another drive preserving the directory structure.

HTH
Holger
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

AFAIK TC doesn't allow to select files by their paths in branch view, only by names and only if there are no duplicate names...

So it would be easier to use search dialog: Alt+F7 and type @filelist.txt into "Search in" field (if folders are listed too, limit search depth to 'current dir only'), TC will list only files from filelist.txt.

And then mentioned CopyTree plugin may be used.
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

MVV wrote:AFAIK TC doesn't allow to select files by their paths in branch view, only by names and only if there are no duplicate names...
The file list supports relative paths.
Just try it :wink:

Regards
Holger
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You're right, it works with relative paths (both via filelist and clipboard).
Post Reply