batch execution
-
I would like to step thru a directory of 500 files,
open a file,
convert it to UTF-8,
save the file then close it,
repeat for the next file.
Any ideas? -
Maybe some ideas HERE as someone yesterday seemed to be trying to do a very similar thing.
But… encoding detection in Notepad++ is just a guess, not an absolute, so you might detect some files wrongly.
I don’t know…sounds dangerous to me… -
@Manfred-Humphries said in batch execution:
would like to step thru a directory of 500 files,
open a file,
convert it to UTF-8,
save the file then close it,
repeat for the next file.Why would you use Notepad++ for this?
Second hit on Google “powershell convert file to utf-8”:
https://superuser.com/questions/1163753/converting-text-file-to-utf-8-on-windows-command-promptGet-Content .\test.txt | Set-Content -Encoding utf8 test-utf8.txtNext, Google “loop through files in directory powershell”. Seems like:
Get-ChildItem "FULL_PATH_TO_DIRECTORY_WITH_ALL_YOUR_FILES" | Foreach-Object { Get-Content $_ | Set-Content -Encoding utf8 $_.utf8}Then all your
*.utf8files can be filtered / moved / copied whereever.I MAKE NO GUARANTEES THIS WORKS!!! PROBABLY MAKES SENSE TO COPY YOUR 500 FILE FOLDER BEFORE STARTING AND THEN OPERATE ON THE COPY JUST IN CASE!!!
Cheers.
-
I used to write batch files and coldfusin apps, but that was long ago and far from my present mental haze… Thanks, but it looks like I’m going to load and save each file.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login