SoX batch that trims beginning and end of file? |
![]() ![]() |
SoX batch that trims beginning and end of file? |
Jun 16 2012, 20:45
Post
#1
|
|
|
Group: Members Posts: 22 Joined: 19-July 08 Member No.: 56012 |
Could someone help me with this? I would like a simple drag-and-drop batch file that trims a few samples at the beginning and end of a wav-file.
Any suggestion what the command line should be? Can't seem to sort it out myself. |
|
|
|
Jun 17 2012, 10:24
Post
#2
|
|
|
Group: Members Posts: 45 Joined: 27-November 11 Member No.: 95439 |
|
|
|
|
Jun 17 2012, 10:30
Post
#3
|
|
![]() Group: Members Posts: 267 Joined: 3-August 08 From: UK Member No.: 56644 |
There's an example drag and drop batch file in the standard SoX windows distribution, so you copy and modify it per chi's suggestion.
|
|
|
|
Jun 17 2012, 20:13
Post
#4
|
|
|
Group: Members Posts: 22 Joined: 19-July 08 Member No.: 56012 |
Perfect, thanks.
Ended up with this: cd %~dp0 mkdir trimmed FOR %%A IN (%*) DO sox %%A "trimmed/%%~nxA" trim Xs -Xs pause Works like a charm. This post has been edited by th0m: Jun 17 2012, 20:14 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 18th June 2013 - 21:50 |