We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f0bf46 commit 0cff518Copy full SHA for 0cff518
media/touch-image.ps1
@@ -0,0 +1,16 @@
1
+# Use case: modify media items without changing their visual content
2
+
3
+# Usage: touch all PNG files in the images directory
4
+# Get-ChildItem ".\themes\images\" -Filter *.png -Recurse | ForEach-Object { Touch-File $_.FullName }
5
6
7
+function Touch-File {
8
+ param ([string]$filePath)
9
10
+ $bytes = [System.IO.File]::ReadAllBytes($filePath)
11
12
+ # Append a harmless zero byte
13
+ $bytes += 0x00
14
15
+ [System.IO.File]::WriteAllBytes($filePath, $bytes)
16
+}
0 commit comments