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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:45:38+00:00 2026-05-20T15:45:38+00:00

I am running a robocopy job through a batch file that is scheduled to

  • 0

I am running a robocopy job through a batch file that is scheduled to run every hour. I am using the following switches:

Robocopy \servername\share D:\somedir /E /R:5 /Log+:D:\Logs\CopyLog.txt

It has been working faithfully for a long time but it ran into a snag this morning. I went to check the log file and was suprised to find it had grown to just shy of 280 Mb.

My question then is how I can change my batchfile to write more managable log files? I think it would make sense to append on a period for which it is reported in. ie: CopyLog_201103.txt would be the log file for March 2011.

I’m fairly adept at working with higher level programming languages, but command line programming was already long gone by the time I was growing up. I’m definitely learning the value of getting a firm understanding of the much more basic computer concepts.

Any suggestions/advice would be appreciated, thanks in advance.

  • 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-20T15:45:39+00:00Added an answer on May 20, 2026 at 3:45 pm

    You can get the day, month and year using this cmd snippet:

    for /f "usebackq tokens=1-3 delims=/" %%d in ('%date%') do (
        set day=%%d
        set month=%%e
        set year=%%f
    )
    

    (Warning: locale specific.)

    Now you can write to different log files as you see fit.

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

Sidebar

Related Questions

Running a rails site right now using SQLite3. About once every 500 requests or
Running Nh 3.2 using SQLite throws the following exception: ---> NHibernate.HibernateException: Could not create
running UNIX through putty, and using vi and gcc. I am attempting to read
running git instaweb in my repository opens a page that says 403 Forbidden -
Running into a problem where on certain servers we get an error that the
Running OS X Leopard an MacBook Pro from Jan. 2008. I used to run
Running ipconfig /all shows a Teredo Tunneling Pseudo-Interface. What is that? Does this have
Running IIS5 (yes, really). I'd like to remove the eTag http header that IIS
Running an ASP.Net website and using TinyMCE for content management. Users need to be
running oracle enterprise linux the Oracle installer keeps telling me that my DISPLAY variable

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.