How to save all the names of JPG files?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Robert2
Gold Member
Gold Member
Posts: 596
Joined: 2004 Jun 17, 15:39

Re: How to save all the names of JPG files?

Post by Robert2 » 2014 Apr 15, 01:33

I am sorry but I cannot help with Polish letters. Polish is all Greek to me!
No offense meant to Nikos!

User avatar
nikos
Site Admin
Site Admin
Posts: 14523
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: How to save all the names of JPG files?

Post by nikos » 2014 Apr 15, 06:12

you don't need xplorer2 or any other tool to get a listing of files. Open DOS window and type

dir c:\*.jpg /b /s > list.txt

use "help dir" for more information

User avatar
nikos
Site Admin
Site Admin
Posts: 14523
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: How to save all the names of JPG files?

Post by nikos » 2014 Apr 15, 08:31

there is no problem with stability, it's all about memory allocation and management. Scrap containers work exactly the same if you have one or a million items in them. Only when you have many items in you must wait a long time

Robert2
Gold Member
Gold Member
Posts: 596
Joined: 2004 Jun 17, 15:39

Re: How to save all the names of JPG files?

Post by Robert2 » 2014 Apr 15, 18:26

Hi Makinero,
I have found a workaround for you.
1. Run the following PowerShell command-line:

Code: Select all

gci -filter *.jpg e:\ -r | % { $_.FullName } > e:\tempz\jpglist.txt
Of course, you've got to adjust the paths ("e:\", and "e:\tempz\jpglist.txt") in the above code to suit your own system.
This will give you "jpglist.txt" with a listing of all the ".jpg" files under the "e:" drive (or any drive that you specify).
Now you might ask "why use a PowerShell command-line?" Simply because the CMD.EXE DIR command does not support Latin extended characters. Hence your problem with Polish characters. On the other hand, PowerShell supports Latin extended characters fully (built-in Unicode support).

As I understand things, you only want the ".jpg" files located in folders beginning with "VK". I haven't found a way to do that with a PowerShell command-line. Maybe Kilmatead can step in here.

But there is a workaround using "Notepad++" (Download Notepad++ 6.5.5).
1. Copy "\VK" to the Windows clipboard.
2. Open "jpglist.txt" in Notepad++.
3. Click "TextFX" on the Notepad++ main menu bar.
4. Choose "TextFX Viz" from the drop-down.
5. Choose "Hide Lines without (Clipboard) text".
You'll get only the lines that contain the "\VK" string and host a ".jpg" file.

HTH.
Cheers,
Robert

User avatar
FrizzleFry
Platinum Member
Platinum Member
Posts: 1143
Joined: 2005 Oct 16, 19:09

Re: How to save all the names of JPG files?

Post by FrizzleFry » 2014 Apr 15, 18:55

just add a where-object filter to your command

Code: Select all

gci -filter *.jpg e:\ -r | where-object{$_.DirectoryName -match '\\VK'} | % { $_.FullName } > e:\tempz\jpglist.txt
or use select-string

Code: Select all

gci -filter *.jpg e:\ -r | % { $_.FullName } | select-string -pattern '\\VK.*?\\' > e:\tempz\jpglist.txt

BRX
Silver Member
Silver Member
Posts: 281
Joined: 2002 Feb 08, 12:12

Re: How to save all the names of JPG files?

Post by BRX » 2014 Apr 20, 16:40

Jumping into the discussion late, but why not simply do a search in x2 for *.Jpg with additional rule "path contains VK" and copy the results from the scrap pane into an editor?

Post Reply