this post was submitted on 26 Jul 2025
2 points (100.0% liked)

Powershell

1167 readers
1 users here now

PowerShell (POSH) is a a task automation command-line shell and scripting language created by Microsoft. It became part of the FOSS community in 2016 and is now available across Windows, Linux, and macOS

Resources:


Rules:

Self-promotion rules:


founded 2 years ago
MODERATORS
 

I have a PDF document that I would like to split with each page being a separate file. I'd like to avoid installing anything to do this as I'm trying to keep the command simple for others to just copy/paste into PowerShell.

Would it also be possible to add the split command to the command below? It renames files based on the list of names found in names.txt. There is an equal number of files and names.

$names = cat "\path\to\names.txt"; $i=0; dir | % { ren $_ "$($names[$i]).pdf"}

you are viewing a single comment's thread
view the rest of the comments
[–] zoolight@lemdro.id 2 points 1 week ago

Updated. Thanks!