Skip to content

Instantly share code, notes, and snippets.

@yzAlvin
Created July 5, 2023 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yzAlvin/c9bb2891db3831d7c7015a672cb665e6 to your computer and use it in GitHub Desktop.
Save yzAlvin/c9bb2891db3831d7c7015a672cb665e6 to your computer and use it in GitHub Desktop.
Windows Powershell script to quickly rename epubs to mobis
$sourceFolder = "E:\path\to\folder"
$epubs = Get-ChildItem -Path $sourceFolder -Filter "*.epub"
foreach ($epub in $epubs) {
$destination = Join-Path -Path $sourceFolder -ChildPath ($epub.BaseName + ".mobi")
Copy-Item -Path $epub.FullName -Destination $destination
}
@yzAlvin
Copy link
Author

yzAlvin commented Jul 5, 2023

Have no idea if there is a proper way to convert between file formats but renaming the extension is enough to get a book working on my e-reader 🤷‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment