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 584059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:51:30+00:00 2026-05-13T14:51:30+00:00

The following mostly works. ‘Mostly’, because the use of the SOMETHING..\tasks\ pathname confuses Spring

  • 0

The following mostly works. ‘Mostly’, because the use of the SOMETHING..\tasks\ pathname confuses Spring when a context XML file tries to include another by relative pathname. So, what I seem to need is a way, in a BAT file, of setting a variable to the parent directory of a pathname.

set ROOT=%~dp0
java -Xmx1g -jar %ROOT%\..\lib\ajar.jar %ROOT%\..\tasks\fas-model.xml tasks
  • 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-13T14:51:31+00:00Added an answer on May 13, 2026 at 2:51 pm

    To resolve a relative path name you can utilize a sub routine call.
    At the end of your batch file place the following lines:

    GOTO :EOF
    
    :RESOLVE
    SET %2=%~f1 
    GOTO :EOF
    

    This is a sub routine that resolves its first parameter to a full path (%~f1) and stores the result to the (global) variable named by the 2nd parameter

    You can use the routine like this:

    CALL :RESOLVE "%ROOT%\.." PARENT_ROOT
    

    After the call you can use the variable %PARENT_ROOT% that contains the parent path name contained in the %ROOT% variable.

    Your complete batch file should look like this:

    SET ROOT=%~dp0
    
    CALL :RESOLVE "%ROOT%\.." PARENT_ROOT
    
    java -Xmx1g -jar "%PARENT_ROOT%\lib\ajar.jar" "%PARENT_ROOT%\tasks\fas-model.xml" tasks
    
    GOTO :EOF
    
    :RESOLVE
    SET %2=%~f1 
    GOTO :EOF
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following situation (mostly because I didn't really thought it through in
I have the following mostly ok code: my $results = { data => [
I am mostly following this page: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html I used this command to create the
Given the following XML I need to place the contents of the suffix tag
I have the following situation. I have an application that runs mostly on one
Working SQL The following code works as expected, returning two columns of data (a
I've got a vanilla Eclipse, installed the ADT and started following some tutorials. Mostly
This is mostly an out-of-curiosity question. Consider the following functions var closure ; function
This form works in Safari. In IE, it mostly works, but I get an
I'm trying to use assertions to show some invariants (mostly in testing) Thus i

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.