diff --git a/Scripts/MD5.ps1 b/Scripts/MD5.ps1 index b32eeae3..999475ab 100755 --- a/Scripts/MD5.ps1 +++ b/Scripts/MD5.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./MD5.ps1 # Description: prints the MD5 checksum of the given file # Author: Markus Fleschutz diff --git a/Scripts/SHA1.ps1 b/Scripts/SHA1.ps1 index be618355..60cfc10e 100755 --- a/Scripts/SHA1.ps1 +++ b/Scripts/SHA1.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./SHA1.ps1 # Description: prints the SHA1 checksum of the given file # Author: Markus Fleschutz diff --git a/Scripts/SHA256.ps1 b/Scripts/SHA256.ps1 index 8da5d62f..f584662d 100755 --- a/Scripts/SHA256.ps1 +++ b/Scripts/SHA256.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./SHA256.ps1 # Description: prints the SHA256 checksum of the given file # Author: Markus Fleschutz diff --git a/Scripts/calculator.ps1 b/Scripts/calculator.ps1 index e2319df6..df795f64 100755 --- a/Scripts/calculator.ps1 +++ b/Scripts/calculator.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./calculator.ps1 # Description: starts a calculator (GUI) # Author: Markus Fleschutz diff --git a/Scripts/crash_dumps.ps1 b/Scripts/crash_dumps.ps1 index 53dd7580..b2771957 100755 --- a/Scripts/crash_dumps.ps1 +++ b/Scripts/crash_dumps.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./crash_dumps.ps1 # Description: enables crash dumps # Author: Markus Fleschutz diff --git a/Scripts/download.ps1 b/Scripts/download.ps1 index 4bc5b930..f5c15397 100755 --- a/Scripts/download.ps1 +++ b/Scripts/download.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./download.ps1 # Description: downloads the file/directory from the given URL # Author: Markus Fleschutz @@ -8,7 +8,6 @@ param([string]$URL) - try { wget --mirror --convert-links --adjust-extension --page-requisites --no-parent $URL --directory-prefix . --no-verbose exit 0 diff --git a/Scripts/email.ps1 b/Scripts/email.ps1 index 70ffeb9e..dd89194e 100755 --- a/Scripts/email.ps1 +++ b/Scripts/email.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./email.ps1 # Description: sends an email # Author: Markus Fleschutz diff --git a/Scripts/empty-dir.ps1 b/Scripts/empty-dir.ps1 index b4e5cca8..08ed6d21 100755 --- a/Scripts/empty-dir.ps1 +++ b/Scripts/empty-dir.ps1 @@ -1,10 +1,9 @@ #!/snap/bin/powershell -:: -:: Syntax: empty-dir.ps1 -:: Description: Empties the given directory. The content is removed! -:: Author: Markus Fleschutz -:: License: CC0 -:: -:: TODO +# Syntax: empty-dir.ps1 +# Description: Empties the given directory. The content is removed! +# Author: Markus Fleschutz +# License: CC0 + +# TODO exit 0 diff --git a/Scripts/exe_info.ps1 b/Scripts/exe_info.ps1 index 560d2d20..9c4c868a 100755 --- a/Scripts/exe_info.ps1 +++ b/Scripts/exe_info.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./exe_info.ps1 # Description: prints basic information of the given executable file # Author: Markus Fleschutz diff --git a/Scripts/init_git.ps1 b/Scripts/init_git.ps1 index fd25d604..5a29ed66 100755 --- a/Scripts/init_git.ps1 +++ b/Scripts/init_git.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./init_git.ps1 # Description: initializes Git # Author: Markus Fleschutz diff --git a/Scripts/list-cmdlets.ps1 b/Scripts/list-cmdlets.ps1 index ebe9f4bc..7f49b06e 100755 --- a/Scripts/list-cmdlets.ps1 +++ b/Scripts/list-cmdlets.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./list-cmdlets.ps1 # Description: lists all PowerShell cmdlets # Author: Markus Fleschutz diff --git a/Scripts/list-empty-dirs.ps1 b/Scripts/list-empty-dirs.ps1 index 61c5c8ee..4a99a0f1 100755 --- a/Scripts/list-empty-dirs.ps1 +++ b/Scripts/list-empty-dirs.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./list-empty-dirs.ps1 # Description: lists empty subfolders in the # Author: Markus Fleschutz @@ -11,7 +11,7 @@ param([string]$DirTree) write-host "Listing empty subfolders in $DirTree ..." try { - (gci $DirTree -r | ? {$_.PSIsContainer -eq $True}) | ?{$_.GetFileSystemInfos().Count -eq 0} | select FullName + (Get-ChildItem $DirTree -recurse | ? {$_.PSIsContainer -eq $True}) | ?{$_.GetFileSystemInfos().Count -eq 0} | select FullName echo "Done." exit 0 } catch { Write-Error $Error[0] } diff --git a/Scripts/list-modules.ps1 b/Scripts/list-modules.ps1 index ef2c000b..243a7c6b 100755 --- a/Scripts/list-modules.ps1 +++ b/Scripts/list-modules.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./list-modules.ps1 # Description: lists all PowerShell modules # Author: Markus Fleschutz diff --git a/Scripts/list-processes.ps1 b/Scripts/list-processes.ps1 index da8aa6ad..9cc6b4a3 100755 --- a/Scripts/list-processes.ps1 +++ b/Scripts/list-processes.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./list-processes.ps1 # Description: lists the local computer processes # Author: Markus Fleschutz diff --git a/Scripts/list-unused-files.ps1 b/Scripts/list-unused-files.ps1 index 3b00663d..4d4c0c85 100755 --- a/Scripts/list-unused-files.ps1 +++ b/Scripts/list-unused-files.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./list-unused-files.ps1 # Description: lists files in the with last access time older than # Author: Markus Fleschutz @@ -13,7 +13,7 @@ write-host "Listing files in $DirTree with last access time older than $NumberOf try { $cutOffDate = (Get-Date).AddDays(-$NumberOfDaysUnused) - Get-ChildItem -Path $DirTree -Recurse | Where-Object {$_.LastAccessTime -le $cutOffDate} | select fullname + Get-ChildItem -path $DirTree -recurse | Where-Object {$_.LastAccessTime -le $cutOffDate} | select fullname exit 0 } catch { Write-Error $Error[0] } diff --git a/Scripts/make-install.ps1 b/Scripts/make-install.ps1 index 794b1d11..1b543e2b 100755 --- a/Scripts/make-install.ps1 +++ b/Scripts/make-install.ps1 @@ -1,9 +1,9 @@ #!/snap/bin/powershell -:: -:: Syntax: make-install.ps1 -:: Description: Copies newer EXE's + DLL's from the build directory to the installation directory. -:: Author: Markus Fleschutz -:: + +# Syntax: make-install.ps1 +# Description: Copies newer EXE's + DLL's from the build directory to the installation directory. +# Author: Markus Fleschutz +# License: CC0 set SRC_DIR=%1 set "DST_DIR=C:\Program Files\MyApp\bin" diff --git a/Scripts/moon.ps1 b/Scripts/moon.ps1 index 929b109d..789394ef 100755 --- a/Scripts/moon.ps1 +++ b/Scripts/moon.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./moon.ps1 # Description: prints the current moon phase # Author: Markus Fleschutz diff --git a/Scripts/news.ps1 b/Scripts/news.ps1 index 15a97ad5..69208e4e 100755 --- a/Scripts/news.ps1 +++ b/Scripts/news.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./news.ps1 # Description: print the latest news # Author: Markus Fleschutz diff --git a/Scripts/password.ps1 b/Scripts/password.ps1 index 967a084c..7270d8c3 100755 --- a/Scripts/password.ps1 +++ b/Scripts/password.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./password.ps1 # Description: generates and prints a single new password # Author: Markus Fleschutz diff --git a/Scripts/passwords.ps1 b/Scripts/passwords.ps1 index 134279cf..1bf3c31f 100755 --- a/Scripts/passwords.ps1 +++ b/Scripts/passwords.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./passwords.ps1 # Description: generates and prints a list of new passwords # Author: Markus Fleschutz diff --git a/Scripts/poweroff.ps1 b/Scripts/poweroff.ps1 index 8f99caff..5bd48901 100755 --- a/Scripts/poweroff.ps1 +++ b/Scripts/poweroff.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./poweroff.ps1 # Description: halts the local computer, administrator rights are required # Author: Markus Fleschutz diff --git a/Scripts/reboot.ps1 b/Scripts/reboot.ps1 index 03d51f9f..698248c2 100755 --- a/Scripts/reboot.ps1 +++ b/Scripts/reboot.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./reboot.ps1 # Description: reboots the local computer, administrator rights are required # Author: Markus Fleschutz diff --git a/Scripts/speak.ps1 b/Scripts/speak.ps1 index ea7aa93d..d0ee0668 100755 --- a/Scripts/speak.ps1 +++ b/Scripts/speak.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./speak.ps1 [] # Description: speaks the given text # Author: Markus Fleschutz diff --git a/Scripts/test.ps1 b/Scripts/test.ps1 index 56809001..a9e65e23 100755 --- a/Scripts/test.ps1 +++ b/Scripts/test.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./test.ps1 # Description: simple PowerShell test script # Author: Markus Fleschutz diff --git a/Scripts/train-dns-cache.ps1 b/Scripts/train-dns-cache.ps1 index b06b9833..083ee796 100755 --- a/Scripts/train-dns-cache.ps1 +++ b/Scripts/train-dns-cache.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./train-dns-cache.ps1 # Description: trains the DNS cache with frequently used domain names # Author: Markus Fleschutz diff --git a/Scripts/translate.ps1 b/Scripts/translate.ps1 index e8bd7bfc..ce03bde9 100755 --- a/Scripts/translate.ps1 +++ b/Scripts/translate.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./translate.ps1 # Description: translates the given text # Author: Markus Fleschutz diff --git a/Scripts/txt2wav.ps1 b/Scripts/txt2wav.ps1 index 93aa6ddb..263ba262 100755 --- a/Scripts/txt2wav.ps1 +++ b/Scripts/txt2wav.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./txt2wav.ps1 # Description: converts the given text into an audio .WAV file # Author: Markus Fleschutz diff --git a/Scripts/wakeup.ps1 b/Scripts/wakeup.ps1 index 2855ebec..ce8e86df 100755 --- a/Scripts/wakeup.ps1 +++ b/Scripts/wakeup.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./wakeup.ps1 # Description: sends a magic packet to the given computer, waking him up # Author: Markus Fleschutz diff --git a/Scripts/weather.ps1 b/Scripts/weather.ps1 index 8c8d6856..1dc06e50 100755 --- a/Scripts/weather.ps1 +++ b/Scripts/weather.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./weather.ps1 # Description: prints the current weather forecast # Author: Markus Fleschutz diff --git a/Scripts/zipdir.ps1 b/Scripts/zipdir.ps1 index f36e711e..65c94ca7 100755 --- a/Scripts/zipdir.ps1 +++ b/Scripts/zipdir.ps1 @@ -1,5 +1,5 @@ #!/snap/bin/powershell -# + # Syntax: ./zipdir.ps1 # Description: creates a zip archive from the given folder # Author: Markus Fleschutz