Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4016336
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:43:39+00:00 2026-05-20T09:43:39+00:00

This script is run from within a directory of OGG files. cd c:\dirWithOGG for

  • 0

This script is run from within a directory of OGG files.

cd c:\dirWithOGG
for %%f in (*.ogg) do (
sox %%f %%f pad 0 "soxi -D %%f"
sox %%f %%f repeat 10
)

First time I’ve had to create a batch script, I thought it’s going to easy.

soxi -D %%f

On it’s own, the above returns a decimal value. For some reason, it’s doesn’t execute from within the script. sox and soxi are in a location added to PATH.

Any help appreciated, thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:43:40+00:00Added an answer on May 20, 2026 at 9:43 am

    If you want to use the output of soxi -D %%f as a command line parameter for sox, here’s how you can do that:

    FOR %%f IN (*.ogg) DO CALL :runsox "%%f"
    GOTO :EOF
    
    :runsox
    soxi -D %1>tmpfile
    SET /P decvalue=<tmpfile
    sox %1 %1 pad 0 %decvalue%
    sox %1 %1 repeat 10
    

    As you can see, the commands inside the loop have been moved to a subroutine that the loop is calling now. Other than that, the output of soxi is redirected to a file, which then is read into a variable, which in turn is used to pass the value to sox.

    It’s actually because of the variable that I had to move the commands outside the loop. It would work incorrectly inside the loop unless delayed expansion was enabled and a different syntax was used to address the variable. I preferred it implemented as above, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this warning every time I run my CGI-script (output is rendered by
How do I tell from within a ruby script whether it has been run
From within a python script (main.py), I am using the subprocess module to run
From within a screen session, I'd like to run a shell script that opens
Can anyone please tell me how do I make this script run in IE
I'm trying to run this script: import re, os def build_pool(cwd): global xtn_pool, file_pool
I have this script and when i try to run it, it just says
I have this mail script I have to run a few times. To start
I'm following this tutorial (seems good) for Rails. After I run ruby script/generate scaffold
On windows, I can run my ruby script like this: > ruby myscript.rb but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.