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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:23:40+00:00 2026-06-17T08:23:40+00:00

I have the following code: @echo off cd %temp% rd /s /q svnbackup >nul

  • 0

I have the following code:

@echo off
cd %temp%
rd /s /q svnbackup >nul 2>&1
md svnbackup\uncomitted_db-pc
cd svnbackup\uncomitted_db-pc
type NUL>files.txt
for /F "tokens=1*" %%T in ('svn status C:\SVN-EDGE') do ( echo %%U>>files.txt && xcopy "%%U" . /E /S /I /F /H /K /X /Y /R )

I get the following output in files.txt:

C:\SVN-EDGE\SomeClient\BUTCHERED.docx 
C:\SVN-EDGE\SomeClient\Development notes.txt 
C:\SVN-EDGE\SomeClient\Received\~$formation for prospective clients.docx 
C:\SVN-EDGE\SomeClient\Sales\Estimates.xlsx 
C:\SVN-EDGE\SomeClient\Sales\Specification.docx 
C:\SVN-EDGE\SomeClient\Sales\~$Estimates.xlsx 
C:\SVN-EDGE\SomeClient\Sales\~$ecification.docx 
C:\SVN-EDGE\SomeClient\removed.docx 
C:\SVN-EDGE\SomeClient\site spec1.docx 
C:\SVN-EDGE\SomeClient\~$TCHERED.docx 
C:\SVN-EDGE\SomeClient\~$emoved.docx 
C:\SVN-EDGE\SomeClient\~$te spec1.docx 

But the thing is, xcopy creates the Received and Development folders inside %temp%\svnbackup\uncomitted_db-pc, but then places the relevant files in the top level of %temp%\svnbackup\uncomitted_db-pc anyway.

At no point are the folders SVN-EDGE or SomeClient created. How can I ensure these folders are created, and that the files fed into xcopy individually listed above are put into the correct subdir?

  • 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-06-17T08:23:41+00:00Added an answer on June 17, 2026 at 8:23 am

    The XCOPY is behaving as it should. It does not replicate the folder hierarchy explicitly specified in your source path. It only replicates folders found from the wildcard side of things, of which your command has none – you are XCOPYing specific files each time.

    Not fully tested, but I believe you can replace your FOR statement with the following and everything should work as you want.

    for /F "tokens=1*" %%T in ('svn status C:\SVN-EDGE') do (
      echo %%U>>files.txt
      xcopy "%%U" ".\%%~pU" /F /H /K /X /Y /R
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following batch file code: @echo off SET INSTALL_PATH=c:\program files\ :ask_again if exist
I have the following code in my batch file @ECHO OFF SET /P NAME=Enter
I have the following code: echo ' <td> <input type=button name=delete value=X onclick=clearSelection(this.form, '.$type.');this.form.submit();
i have the following code : <input type=text value=<?php echo $_GET['msg']; ?>> This input
I have the following piece of code. <?php $agentId = LTH001; echo && .
I have the following code: @ECHO OFF IF EXIST comandosAEjecutar.tpl (DEL comandosAEjecutar.tpl) ECHO Procesando
I have a batch file using the following code: @echo off :: BatchGotAdmin :-------------------------------------
I have the following line of code: echo '<INPUT TYPE=submit name=delete value=Delete account onClick=return
I have the following code: echo <script type='text/javascript'> if(window.location.href.toLowerCase().indexOf('test') != -1) { } else
So I have the following code: echo '<li><a href="'.$Website.$Elements[2].'/'.$Row["povezava"].'" class="leftMenuArticlesInactive"></a><li>'; $Website contains: http://www.somesite.com/test/ $Elements[2]

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.