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

  • Home
  • SEARCH
  • 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 769059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:16:37+00:00 2026-05-14T18:16:37+00:00

I am trying to write a small batch file for a task I do

  • 0

I am trying to write a small batch file for a task I do regularly. I have never used the for before and this is the first time I am trying this. This is what I have come with so far:

for /f %i in  ('ct find . -ver lbtype(%1) -print') do ct lsvt -g %i

Basically it tries find all the files with a given cleracase label and then display the version tree of those files. The problem is in the %1 . But when I try to run this sometime it gives me an error saying that -print ) was not expected or sometime else it just prints this command on the command prompt. I guess it is getting confused between multiple paranthesis. Any clues how o I solve this?

  • 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-14T18:16:38+00:00Added an answer on May 14, 2026 at 6:16 pm

    Try quoting the command you’re executing in the for:

    for /f %i in  ('"ct find . -ver lbtype(%1) -print"') do ct lsvt -g %i
    

    That worked for a similar command that I had that took args with parens.

    Also, (as you’re probably aware), you’ll need to double-up on the '%' characters for the for variable when you put the command in a batch file instead of running it at the command line:

    for /f %%i in  ('"ct find . -ver lbtype(%1) -print"') do ct lsvt -g %%i
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write a small application and have come across a compile time
I have an assignment about fftw and I was trying to write a small
Trying to write this small program to help me in my Stats class, everything
I am trying to write a small library which will use DirectShow. This library
I am trying to write a small ruby script that will have two methods
I've been trying to write a small file server. I got it to the
I'm trying to write a small batch script that will delete files old files
I'm trying to write a small app which can be used in order to
I am trying to write a small documentation tool to be used from the
I am trying to write a small web tool which takes an Excel file,

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.