https://github.com/hymkor/update-exe-all.ps1
A PowerShell script that overwrites the specified executable file to a file with the same name in the directory specified by the environment variable PATH
https://github.com/hymkor/update-exe-all.ps1
Last synced: 23 days ago
JSON representation
A PowerShell script that overwrites the specified executable file to a file with the same name in the directory specified by the environment variable PATH
- Host: GitHub
- URL: https://github.com/hymkor/update-exe-all.ps1
- Owner: hymkor
- License: mit
- Created: 2024-01-26T11:51:07.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-25T14:28:36.000Z (about 1 year ago)
- Last Synced: 2025-02-10T15:50:55.900Z (3 months ago)
- Language: PowerShell
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Update-Exe-All.ps1
==================A PowerShell script that overwrites the specified executable file to a file with the same name in the directory specified by the environment variable PATH.
(Japanese: 指定された実行ファイルを、環境変数PATHで指定されたディレクトリの同名ファイルに上書きコピーする PowerShell スクリプトです )
```
C:> Update-Exe-All.ps1 Update-Exe-All.ps1
Update "C:\Users\hymkor\Share\cmds\Update-Exe-All.ps1" ? [y|n]: yDirectory: C:\Users\hymkor\Share\cmds
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 2024/01/18 木曜日 12:20 695 Update-Exe-All.ps1
```If the file to be overwritten is in use and cannot be written directly, avoid overwriting errors by renaming it and replacing it.
(Japanese: 上書きされるファイルが使用中で直接書き込めない場合、リネームしてから差し替えることで上書きエラーを回避します )
```
C:> Update-Exe-All.ps1 nyagos.exe
Update "C:\Users\hymkor\OneDrive\Share\bin64\nyagos.exe" ? [y|n]: yDirectory: C:\Users\hymkor\OneDrive\Share\bin64
Mode LastWriteTime Length Name
---- ------------- ------ ----
la--- 2024/01/03 水曜日 0:43 6070272 nyagos.exe-2079168037
-a--- 2024/01/26 金曜日 15:55 6070272 nyagos.exe
```Download and Install
--------------------On the directory where the environment variable PATH specifies.
( 書き込み可能な、環境変数 PATH が指定するディレクトリにて )```
curl -O https://raw.githubusercontent.com/hymkor/Update-Exe-All.ps1/master/Update-Exe-All.ps1
```When the scoop-installer is avilable,
( scoop-installer が使える場合 )```
scoop bucket add hymkor https://github.com/hymkor/scoop-bucket
scoop install Update-Exe-All.ps1
```