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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:09:19+00:00 2026-06-06T09:09:19+00:00

I have a .bat file that publishes my VS2010 application, then copies the files

  • 0

I have a .bat file that publishes my VS2010 application, then copies the files to a location on my test webserver so i dont have to manually do it. I have a couple of directories i dont want to copy everytime because the contents wont change, and there are a ton of files. Heres my xcopy command:

 XCOPY C:\Publish\NewPCloser\* \\testserver\c$\NewPCloser /s /i /Y /EXCLUDE:c:\exclude.txt

Heres my exclude.txt file:

  web.config
  c:\Working\PaperlessCloser4.0\PaperlessCloser4.0\Content

It excludes the web.config, but it still copies the Content folder and all 300+ files. How do i exclude a directory and from copying via xcopy? 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-06-06T09:09:20+00:00Added an answer on June 6, 2026 at 9:09 am

    According to this, to exclude a directory you would simply add it to the exclusion file like any other string, but it needs to have a backslash at the beginning and end of its name. So if you have a directory called Content within the directory you are copying, you should be able to add \Content\ to your exclusion file and it should ignore any files whose path contains that string.

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

Sidebar

Related Questions

I have the following problem. I got a bat file that runs testcomplete test.
I have a bat file on server that return result, then I want to
I have a bat file that I want to run at specific day/time in
I have bat-file, that make some operations. How to run this file from Delphi
I have a .bat file to be executed. Inside that .bat file, at its
I have made a batch file that call another one program.bat , the first
I have a PHP script that executes a .bat file using system(cmd /c C:\dir\file.bat);
I have created a .bat file that displays all the users logged in Windows
I have created a .bat file that displays a servers terminal Service SessionID and
I have to create a .BAT file that does this: If C:\myprogram\sync\data.handler exists, exit;

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.