This repository provides a tool for creating shortcuts to file or URL listed in a specified CSV file.
The key features of this tool are as follows:
- Create a shortcut file for a file or URL
- Detects invalid file paths and skips creating shortcuts to them
- Remove invalid characters from file names
- Can create shortcut files based on environment variables
> .\src\Main.ps1 -listPath .\data\list.csv -defaultParent \path\to\default_folder -Preview
Argument | Required | Default | Explanation |
---|---|---|---|
-listPath <path> |
o | - | A path to a list CSV file that describes the targets of the shortcut creation |
-defaultParent <path> |
x | .\ |
A default path to save shortcuts |
-Preview |
x | False | A flag to show a preview before creating shortcuts |
Path,Target,Name
\path\to\file_A,\path\to\folder_B,
\path\to\folder_C,,Dir_C
https://example.com,,
If the CSV file specified by -listPath
is described as above,
- the shortcut for
\path\to\file_A
will be namedfile_A
and placed in\path\to\folder_B
. - the shortcut for
\path\to\folder_C
will be namedDir_C
and saved in the location specified by-defaultParent
. - the shortcut for
http://example.com
will be namedexample.com
and saved in the location specified by-defaultParent
.