batch-file

How to create a powershell script / or windows .bat file for ffmpeg

守給你的承諾、 提交于 2021-02-11 06:31:34
问题 So, I want to create a Powershell or Batch file (whichever works best for the task), that I can paste in a folder and after executing it, will start to use FFmpeg to encode all videos The part that works (in .bat): for %%a in ("*.mkv") do( ffmpeg -i "%%a" -c:v libx265 -c:a copy -x265-params crf=25 "%%a [encoded].mkv" pause) This works, but in some folders, I already have [encoded] files. I'd like for the script to skip these files. I asked in reddit and received the following script: for %%a

How to create a powershell script / or windows .bat file for ffmpeg

岁酱吖の 提交于 2021-02-11 06:31:26
问题 So, I want to create a Powershell or Batch file (whichever works best for the task), that I can paste in a folder and after executing it, will start to use FFmpeg to encode all videos The part that works (in .bat): for %%a in ("*.mkv") do( ffmpeg -i "%%a" -c:v libx265 -c:a copy -x265-params crf=25 "%%a [encoded].mkv" pause) This works, but in some folders, I already have [encoded] files. I'd like for the script to skip these files. I asked in reddit and received the following script: for %%a

Java: Runtime.exec() and Unicode symbols on Windows: how to make it work with non-English letters?

巧了我就是萌 提交于 2021-02-11 06:16:12
问题 Intro I am using Runtime.exec() to execute some external command and I am using parameters that contain non-English characters . I simply want to run something like this: python test.py шалом It works correctly in cmd directly, but is incorrectly handled via Runtime.exec.getRuntime()("python test.py шалом") On Windows my external program fails due to unknown symbols passed to it. I remember similar issue from early 2010s (!) - JDK-4947220, but I thought it is already fixed since Java core 1.6

Java: Runtime.exec() and Unicode symbols on Windows: how to make it work with non-English letters?

本小妞迷上赌 提交于 2021-02-11 06:15:59
问题 Intro I am using Runtime.exec() to execute some external command and I am using parameters that contain non-English characters . I simply want to run something like this: python test.py шалом It works correctly in cmd directly, but is incorrectly handled via Runtime.exec.getRuntime()("python test.py шалом") On Windows my external program fails due to unknown symbols passed to it. I remember similar issue from early 2010s (!) - JDK-4947220, but I thought it is already fixed since Java core 1.6

Batch renaming files after certain character

只谈情不闲聊 提交于 2021-02-11 04:52:37
问题 I have a bunch of video files with names like so: 6592110904-Ivory-2.mp4 6592280588-Cornflower.mp4 6592321696-Ballet Pink.mp4 I want to rename them to get rid of everything after the first hyphen so they end up like: 6592110904.mp4 6592280588.mp4 6592321696.mp4 How do I go about doing this? 回答1: Please put the code below in a bat file, place it in directory with mp4 files. Before running real renaming, please remove "echo" before "move". please be carefull with renaming bacause (theoretically

Batch renaming files after certain character

限于喜欢 提交于 2021-02-11 04:52:13
问题 I have a bunch of video files with names like so: 6592110904-Ivory-2.mp4 6592280588-Cornflower.mp4 6592321696-Ballet Pink.mp4 I want to rename them to get rid of everything after the first hyphen so they end up like: 6592110904.mp4 6592280588.mp4 6592321696.mp4 How do I go about doing this? 回答1: Please put the code below in a bat file, place it in directory with mp4 files. Before running real renaming, please remove "echo" before "move". please be carefull with renaming bacause (theoretically

Batch script multiple choice menu

我只是一个虾纸丫 提交于 2021-02-11 00:20:07
问题 I have multimedia file viewing software that I call in a batch script to load files using an /LOADFILES argument. This argument accepts multiple files separated by semicolons ";". What I would like is a menu from which I can select the files I want to open. For example : Sample_01 Sample_02 Sample_03 Sample_04 Sample_05 All What is your choice ? And what we have selected ends up stored in a variable which is interpreted by the /LOADFILES argument. For now, my script is able to open all the

How to run a script on startup in hidden mode

血红的双手。 提交于 2021-02-10 20:41:50
问题 I have a batch file, named prova.bat , and I need to launch it at the startup of the computer, and I need to launch it in hidden mode (with no visible prompt). I have found on the net solutions to launch the batch at the startup OR solutions to launch the batch in hidden mode, but not solutions to fix both my problems. I have tried with a VBScript and set the script to run at the startup (in the SystemConfiguration). The OS where the batch have to run is Windows 8.1. Here's the content of the

Running Macro from .bat with another Access db open

微笑、不失礼 提交于 2021-02-10 16:23:12
问题 I need to run a few Access macros automatically periodically throughout the day, I do this by scheduling a batch file to open the relevant Access db and run the macro. The problem that I am having is, if I am working on another Access database and therefore already have an instance of Access open, the batch file runs but only opens the database containing the macro that is supposed to run and stops. So the macro doesn't run. Has anyone else had this issue or know how to solve it? The batch

batch script - write all files found in one directory into one command line?

老子叫甜甜 提交于 2021-02-10 15:00:57
问题 I have a directory with a bunch of files with a mix of extension. I only want to work with files with extension *.abc. Each *.abc file should then be handed over to another software with some parameters. The parameters are always the same for each file. One of the parameters needs to be defined by the user, though. So my first try was this: @ECHO OFF set /p value="Enter required imput value: " for %%f in (*.abc) do ( START C:\"Program Files"\Software\startsoftware.exe -parameter1 "%%~nf.abc"