Sort by filename doesn't match short cut filename sort order in Windows 10 File Explorer

New Here ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

I'm brand new to Lightroom (I'm using the Creative Cloud version).  I want to create a slideshow of about 200 photos that I have in local files on my Windows machine.   As part of selecting the photos I created a folder with short cuts pointing to the original photos, with short cut names choosen to give the proper sort order (the file name dates were munged by previous import operations, long story)

 

I imported the short cut photos into Lightroom, but when I sort by date using the sort menu at the bottom of the browsing window, like this:

 

SortByDate.png

 

The order of the photos is different from how they are displayed in the short cut Windows File Explorer, (when sorted by short cut name).

 

I can't seem to show what Lightroom thinks the filename is for a photo, but I'm guessing Lightroom decided to ignore the short cut filename and use the underlying physical filename instead.

 

Any ideas about how to import and sort by short cut name?

 

A typical short cut name is "000_DSC_0105.jpg - Shortcut" which points to DSC_0105.jpg in another directory.

 

Thanks in advance

Ben

TOPICS
Import and share, Problem or error, Windows

Views

32

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Well, I figured the easiest thing to do would be to convert the Windows shortcut files into regular file, but keeping the shortcut name for ordering. It turns out I had to write a Windows Powershell script to do this:

$wshShell = New-Object -ComObject wscript.shell
# Source dir containing files like "2021_02_IMG_6299.jpg - Shortcut.lnk"
$LinksFolder = 'D:\pictures'
$DestFolder = 'L:' # Destination USB thumbdrive
$wshShell = New-Object -ComObject wscript.shell
gci $LinksFolder '*.lnk' -recurse | Foreach{
  $Source = Get-item ($wshShell.CreateShortcut($_.FullName)).TargetPath
  #change the extension to match source. Hopefully there's no extra '.lnk' in the name
  $Destination = Join-Path $DestFolder $_.Name.Replace(' - Shortcut.lnk','')
  Copy-Item $Source $Destination -Whatif #Take off -Whatif when you like the results
}

Note that on some Windows machines you have to set an option to allow you to run a Powershell script (this option only affects the current session to execute it in a Powershell command session. Don't set it globally):

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines