Найти плохие файлы ярлыков в Windows

255
birdman3131

Мне нужно быть в состоянии найти все файлы ярлыков на общем сетевом диске и избавиться от любых плохих. Я бы предпочел простой поиск окон, который я могу просмотреть вручную и выбрать, какие из них удалить. Я открыт для программ, если мне нужно их использовать, но они должны позволить мне выбрать, где искать и показать путь, на который указывает ярлык, прежде чем я от него избавлюсь.

Поиск, который работает на сервере 2k3 или Windows 8.1 Pro PC будет работать.

Предыстория: Я уже некоторое время пытаюсь отследить причину замедления работы AutoCAD, и, кажется, я проследил это до наличия ярлыков, ведущих к неверным путям. Причина, по которой мне нужно просматривать их, а не автоматизировать, заключается в том, что, хотя у большинства пользователей диск будет отображаться как F: \, ни мой компьютер (8 Pro, отображенный как Z :), ни сам сервер не смогут использовать любые ярлыки, отображенные как f: \ но их следует оставить, если они действительны для всех остальных.

1

1 ответ на вопрос

0
DavidPostill

I need to be able to find all the shortcut files get rid of any bad ones.

Take a look at lnk-parser

LNK Parser allows you to view the content of Windows shortcut (.LNK) files.

Command-line Usage

You can run the program from a command-line and supply a shortcut file or a directory.

If a directory is supplied, the directory and any sub-directories will be scanned for shortcut files.

Example 1:

lnk_parser_cmd.exe shortcut.lnk

Example 2:

lnk_parser_cmd.exe C:\Users\User\Desktop

There are additional options that can be specified to allow you to generate various reports of the shortcut file information.

The following is a list of supported options:

  • -o Sets the output directory for reports.
  • -w Generates an HTML report.
  • -c Generates a comma-separated values (CSV) report.
  • -r Remnant and unprocessed data will be dumped to the HTML report.
  • -s Prevents the console from outputting information.

Example:

lnk_parser_cmd.exe -o Output -w -c -r -s shortcut.lnk

If you wish to save the command-line output to a file, you can use the redirect operator.

Example:

lnk_parser_cmd.exe shortcut.lnk > output.txt

You can speed up the extraction and report generation by redirecting the command-line output to the NUL device, or by using the -s option mentioned above.

Example 1:

lnk_parser_cmd.exe shortcut.lnk > NUL

Example 2:

lnk_parser_cmd.exe -s shortcut.lnk

The program can also be run normally (not through the command-line). It will ask for the shortcut file or directory, and whether you wish to include a report(s).

When specifying a file or directory path, it's best to surround it with quotes since spaces within the path might be interpreted as separate options.

Code license is GNU GPL v3 .


Disclaimer

I am not affiliated with lnk-parser in any way.