ShareX Update Latest File Path Clipboard Copy

Copy the Path of the Latest Updated File in ShareX to Clipboard

From Windows WSL Linux Bash, copy the path of the most recently updated file captured by ShareX, a screen capture and screenshot software, to the clipboard. This is a personal memo.

Vulpes
1 min read
Oct 9, 2025

From Windows WSL Linux Bash, copy the path of the most recently updated file captured by ShareX, a screen capture and screenshot software, to the clipboard. This is a personal memo.

wslpath -w $(find "/mnt/c/Users/user/OneDrive/ใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆ/ShareX/Screenshots/" -printf '%T+ %p\n' | sort -r | head -n 1 | sed -Ee "s/^.*(\/mnt.*\.(jpg|png))/\1/g") | clip.exe
alias getSharex='wslpath -w $(find "/mnt/c/Users/user/OneDrive/ใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆ/ShareX/Screenshots/" -printf "%T+ %p\n" | sort -r | head -n 1 | sed -Ee "s/^.*(\/mnt.*\.(jpg|png))/\1/g") | clip.exe'

Share this article

Vulpes Oct 9, 2025

๐Ÿ”— Copy Links