avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday July 24, 2024, 11:01 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - 4wd [ switch to compact view ]

Pages: prev1 2 3 4 [5] 6 7 8 9 10 ... 225next
So anyway the following works in Powershell 5.1 (included with Windows) and Powershell 7 (to be included in Windows at some point):

Code: PowerShell [Select]
  1. $LogFile = "R:\te st\Me\NPM Change Log.txt"
  2. $ChangeType = "Added a line"
  3. $FullPath = "R:\te st\Me\NPM Change Log.txt"
  5. Set-Content "$($LogFile)" "This is a log file"
  6. $logline = "$(Get-Date), $ChangeType, $FullPath"
  7. Add-content "$($LogFile)" -value $logline
  8. # and again just in case
  9. Add-Content "$($LogFile)" "$(Get-Date), $($ChangeType), $($FullPath)"

FWIW, I normally always put variables in $() in strings that are within double quotes these days, then I'm sure the variables will be expanded.

And your recollection is way gooder than mine. :D

Or maybe not  :P

Just FYI, PowerShell doesn't care if you use \ or / in paths so you could try:
Code: PowerShell [Select]
  1. $LogFile = "C:/Users/Me/Them/NPM Change Log.txt"

To get around possibly having to escape \

Also, is it just a typo but you seem to have only one " in:

Code: PowerShell [Select]
  1. Add-content "$LogFile -value $logline

To insert variables into a string you can try:

Code: PowerShell [Select]
  1. Add-content "$($LogFile)" -value $logline
That should expand the variable within the quotes.

I'm on a tablet atm so can't test these, in a couple of hours I can have a play.

Addendum: IIRC I had a similar thing with Add-Content that I was doing and the result was that Add-Content was one of the very few PowerShell commandlets that couldn't take a file in a variable.

I modified my script to use Out-File instead, eg.

Code: PowerShell [Select]
  1. "$(Get-Date), $ChangeType, $FullPath" | Out-File $Logfile -Append

Or similar, you may have to play around with enclosing the file variable in quotes as above.

Living Room / Re: Wordle: simple web word game
« on: January 05, 2022, 05:59 AM »
Brad Wyatt translated Wordle into a PowerShell module:
Play Wordle, the Puzzle Game Using PowerShell


You can also just double-click an ISO to have it mounted and opened in explorer, (providing the filetype hasn't been reassigned).

Living Room / Re: How to boot up an old PDP-11 computer from the 1970s
« on: December 16, 2021, 05:22 AM »
I remember using the PDP-11 back at uni, fun times programming on the old terminals.

Ignore me .... my brain hurts  :-\

Living Room / Re: Recommend some music videos to me!
« on: December 09, 2021, 04:20 AM »
I’ve been listening to a lot of Symphonic Metal lately.

Speaking of Finnish Symphonic Metal, can't go past a little Apocalyptica:

This isn't available on YT that I can find but another mashup from DJ Schmolli:
Vikings on Dark Horses (Amon Amarth vs. Katy Perry ft. Juicy J)

And from one of my favourite places on the planet, The HU ft. Jacoby Shaddix:

Living Room / Re: Wordle: simple web word game
« on: November 25, 2021, 04:32 PM »
Interesting, obviously not the same word for everyone since the word I just got doesn't have repeated letters.

Living Room / Re: Wordle: simple web word game
« on: November 23, 2021, 05:39 PM »

Stop while I'm ahead  :P

Adobe Acrobat:

Convert a web page to PDF

- Open Acrobat and choose Tools > Create PDF > Web Page.
- Enter the complete path to the web page, or click Browse and locate an HTML file.
- To change the number of levels in the website to convert, click Capture Multiple Levels. Enter the number of levels to include, or select Get Entire Site to include all levels from the website.

I'd start off with just 2 levels so you don't end up dragging in web pages from all over the internet.

An alternative is to use something like monolith to see if it will create a single HTML file that can be fed to a PDF converter, (online or offline).

Or, capture each page with monolith and then convert each to PDF appending to the first PDF in order.

General Software Discussion / Re: Collect data from web
« on: October 19, 2021, 07:49 PM »
I would like a software able to find data in the web :

Er ... isn't that called a search engine?

In which case if you want to run your own, YaCyw.

General Software Discussion / Windows 11 Released to GA
« on: October 04, 2021, 07:47 PM »
Windows 11 has gone to General Availability:

Had it installed on a laptop, (i5-6200u), for a couple of weeks and while it ran smoother that taskbar is a big step in the wrong direction, ended up reinstalling 10.

Edit: BTW, something to note for those of you who update their BIOS.  Latest updates might have switched to TPM enabled by default, (was normally disabled by default).
So if you update your BIOS you might find your carefully constructed plan of not upgrading to 11 by disabling TPM is now FUBAR.  ;)

Living Room / Re: playstore downloads
« on: September 21, 2021, 10:23 PM »
The size reported in pending updates is the approx. download size, when it's downloading it shows the installation size as well as the amount that it's downloading, (which will be equivalent to the pre-update size reported), see below for an example:


I'd say the Netflix update includes more functions or a rewrite, that's why the update is larger than the install.

What is annoying after recent Play updates is how damn slow it is to scan for updates.

General Software Discussion / Re: Montage Videos
« on: September 19, 2021, 12:07 PM »
Load the movie,
Move to the start of a section you don't want,
Hit cursor up or down to move to the nearest I-Frame,
Control+PgUp to mark the start,
Move to the end of the section,
Hit cursor up or down to move to the nearest I-Frame,
Control+PgDn to mark the end,
Control+X to remove that section,
Repeat as necessary,

If you haven't made a cut on an I-Frame you will be warned.

Otherwise there's also Lossless-Cut if you like funky interfaces.

General Software Discussion / Re: Free MKV video repair files
« on: September 09, 2021, 03:44 AM »
The track is damaged and is not possible to recover the images quality.

Depends how the track is damaged, if it's data corruption due to the azide layer detiorating then no, you've got no hope.
If it's due to a scratch on the DVD then you can polish it out, I've recovered quite a few CDs/DVDs doing this.

FWIW, I still use RipIt4Me if I need to rip a DVD.

Further to WiFi controlled plug:

Two projects to control a TP-Link power plug via PowerShell which could run on the Windows 10 host.

Living Room / Re: Problem with Win Remote Connection
« on: August 30, 2021, 08:10 PM »

Of course that presupposes that the computer is capable of running Remote Desktop Host, (ie. Professional or above).

Otherwise you have to use Remote Assistance or some other remote access program/service.

I know Dell has a power setting to optimise battery life but I wouldn't have thought it would be possible to have a generic program that could do it.

Windows can't control the battery charging without some form of hardware driver and that's likely to be manufacturer specific.
You can check your laptop manufacturer's support section for such a program but then it's likely to have fixed settings.

Best option if you want to control the charge levels, get a WiFi controlled switch, plug the charger into it, and use a battery level monitoring program/script to tell the switch to turn the charger on/off at set levels.

I work with torrents and try to help others out the best I can. This program is excellent, yet command line only.

I was wondering about a GUI that is editable to be able to add more trackers to it.

What about this tool: Torrent File Editor

Wasn't there a browser in the 90's that gave you free internet time if you allowed them to show you ads?

Don't know about a browser but we had a couple of ISPs that provided free internet if you allowed them to show you ads - they didn't last very long.

General Software Discussion / Re: email sender rewrite proxy
« on: August 17, 2021, 08:22 PM »
Anyone have any ideas? I have not yet stumbled upon the magical query to make the google give me a good answer...

This thread sounds like the same problem:

With the relevant script at post:

Note the post saying to remove var a couple of posts later.

The Mysterons

What did you think of the reworked Captain Scarlet episodes?  I preferred it when it was obvious they were puppets.  I don't really get the point of the video "upgrades."

I've never seen the remade version, haven't seen the original since about the time it came out, (along with Joe 90 and the other Century 21 marionette series).
Still manage to catch one of the original Thunderbird episodes once every few years though, they seem to get repeated quite often.

the ring?

The Mysterons

General Software Discussion / Re: What Android Apps Do You Use?
« on: August 12, 2021, 08:13 PM »
For transferring files to/from my phone, I just use the Android version of Total Commander. With that I can connect through WiFi with my cabled computer. You can get extra modules for this version of Total Commander to use the LAN directly. Or FTP/SFTP or even directly using just WiFi between 2 devices. All for free.

Started using KDE Connect since they've recently released a Windows client, (Windows 10 only):

Features listed as working in this beta build include:

    Shared clipboard to/from Windows and Android
    See phone battery and signal strength on desktop
    Remote Input (i.e. use your phone as a mouse on Windows)
    Notifications sync
    File transfer
    Pause Music
    Multimedia remote control
    Presentation Remote
    End-to-end TLS encryption
    WiFi connection
    Run custom commands on the desktop remotely
    Locate your phone

To date it has been the easiest method by far for devices on the same WiFi network that I've ever used.

Right-click a file->Send to->Send to remote device via KDE Connect for the computer, select a file and Share via KDE Connect on Android - then select the device you want to send it to.

All versions available from here.

General Software Discussion / Re: What Android Apps Do You Use?
« on: August 12, 2021, 07:49 PM »
EDIT: v5.6 has disappeared from F-Droid, (looks like they only keep the current and previous two versions).

Old versions here:

Should I uninstall the newest version before installing v5.6? Thanks

Yes, export K-9's settings first, uninstall it, sideload 5.6, and import the settings - you will need to enter any passwords for accounts, they don't get exported.

Also, I'm not sure but the earlier versions from UpToDown might auto-update since they're just the APK pulled from the Play store whereas F-Droid versions are built by F-Droid from the repo without the Play store link so can't auto-update.

I've attached F-Droid's 5.6 version.

Downgrade instructions at K-9 Mail's forum.

Pages: prev1 2 3 4 [5] 6 7 8 9 10 ... 225next