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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:19:31+00:00 2026-05-27T04:19:31+00:00

I am learning C# AND Java and I often create small projects and programs

  • 0

I am learning C# AND Java and I often create small projects and programs in these languages. Usually my source code is at C:……\Visual Studio 2010\Projects\MyProject or C:……\Eclipse\Projects\MyProject.

I often get to a point where the code is partially working and while trying to add a new feature I end up breaking the working code. It is frustrating to fix all the changes and get back to the old state and takes a long time just to go back to where I came from.

I was wondering if you could help me write a batch (or Win PowerShell?) script to back up my source folders to a D:\Backup\SourceCode\CSharp\MyProject and D:\Backup\SourceCode\Java\MyProject. And place the script on my desktop so that i can run it time to time whne i have good working code.

Or if there are any other solutions to this problem that you might be using are also welcome.

  • 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-27T04:19:32+00:00Added an answer on May 27, 2026 at 4:19 am

    A real version control system is far better. I would recommend
    GIT

    Here is a batch example to do what you want:

    REM Delete backup directory
    if exist D:\Backup\Code\*.* rd D:\Backup\Code /s /q
    
    REM Create/recreate backup directory
    mkdir D:\Backup\Code
    
    REM Copy files/folders
    xcopy "C:\SourceCodeFolder" /e /i /y D:\Backup\Code
    
    cls
    exit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started learning java, and know only a small amount of code,
While learning different languages, I've often seen objects allocated on the fly, most often
I'm learning java. I was trying to run the code, where I got this
I'm learning Java and I wanted to create a very basic Calculator to calculate
While learning Java I stumble upon this error quite often. It goes like this:
I'm learning java and have a bit of code I am trying to write
I have only started learning Java. My task is to create a file server
I am just learning Java applets. When I changed my code, it doesn't update
I've been learning Java these days and what I've read just is Be careful
When I was learning Java coming from a background of some 20 years of

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.