gpt4 book ai didi

windows - 在 Windows 中创建文件夹最新文件的快捷方式

转载 作者:行者123 更新时间:2023-12-03 11:07:30 26 4
gpt4 key购买 nike

有没有办法创建快捷方式始终指向 Windows 中最新(或最大等)的文件夹?

例如:
文件夹/文件 1 2012-01-01 xxx
文件夹/文件 2 2013-01-01 xxx

文件夹/快捷方式 -> 指向 file2

编辑文件 1 后:

文件夹/文件 1 2013-02-01 xxx
文件夹/文件 2 2013-01-01 xxx

文件夹/快捷方式 -> 指向 file1

最佳答案

您可以使用 PowerShell 脚本为您打开文件:

$dir = "C:\test_code"
$filter="*.txt"
$latest = Get-ChildItem -Path $dir -Filter $filter | Sort-Object LastAccessTime -Descending | Select-Object -First 1
Invoke-Item $latest.fullname

关于windows - 在 Windows 中创建文件夹最新文件的快捷方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14593754/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com