Monday, January 18, 2016
Prepend data to each line in text file
I needed to write a string to the start of each line in a text file. I used Powershell to achieve this. You can see the code here: http://pastebin.com/vg2SDrqX
Saturday, January 2, 2016
Create a html file with images
I needed to create a quick and dirty HTML file that had 2 columns. 1 column was the website path to the image, the 2nd column was the image itself. This would need to be created dynamically.
I have powershell code on pastebin.com here: http://pastebin.com/YXZqg1yb.
The following command:
.\CreateHTMLWithImages.ps1 -website http://www.anonit.net/images/2016/1/3/ -sourcepath \\web01\blog\images\2016\1\3\ -HTMLFile \\web01\blog\20160103.html -YSize 100 -XSize 100
Will produce a HTML file similar to this.
I have powershell code on pastebin.com here: http://pastebin.com/YXZqg1yb.
The following command:
.\CreateHTMLWithImages.ps1 -website http://www.anonit.net/images/2016/1/3/ -sourcepath \\web01\blog\images\2016\1\3\ -HTMLFile \\web01\blog\20160103.html -YSize 100 -XSize 100
Will produce a HTML file similar to this.
Subscribe to:
Posts (Atom)