• 0

Simple Windows robocopy batch. Need help.


Question

I've made a simple robocopy script, but it's not doing what I want. To keep it simple for now, I have only one job, and I am running it as a dry run.

set robocopy="C:\Windows\System32\robocopy.exe"
Set LogFile="D:\backup to downstairs.txt"
set options=/L /mir /dcopy:T /copy:DAT /xa:h /LOG+:%LogFile%
set exclude=D:\Programs\uTorrent "D:\unknownsoldierx\Audio Books" D:\unknownsoldierx\Desktop D:\unknownsoldierx\Favorites D:\unknownsoldierx\Links

%robocopy% D:\Android \\DOWNSTAIRS\Android %options% /XD %exclude%
[/CODE]

Here is the result. Why does it include switches I haven't specified, especially the /purge switch, which I definitely do not want?

Also, how can I perform /LOG and /v at the same time? I'd like to specify the file name for the log, but I also want verbose output so I can see which files were skipped.

[CODE]
-------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : Mon Aug 13 10:41:50 2012

Source : D:\Android\
Dest : \\DOWNSTAIRS\Android\

Files : *.*

Exc Dirs : D:\Programs\uTorrent
D:\unknownsoldierx\Audio Books
D:\unknownsoldierx\Desktop
D:\unknownsoldierx\Favorites
D:\unknownsoldierx\Links

Options : *.* /L /S /E /COPY:DAT /DCOPY:T /PURGE /MIR /XA:H /R:1000000 /W:30

------------------------------------------------------------------------------

I've ommited the file list

------------------------------------------------------------------------------

Total Copied Skipped Mismatch FAILED Extras
Dirs : 19 18 1 0 0 0
Files : 62 62 0 0 0 0
Bytes : 881.92 m 881.92 m 0 0 0 0
Times : 0:00:00 0:00:00 0:00:00 0:00:00

Ended : Mon Aug 13 10:41:50 2012
[/CODE]

4 answers to this question

Recommended Posts

  • 0

Take a look at this site, it explains what each switch does, it should help identify what is adding the additional switches. I can't see why you can't add /v as well as /Log...

/MIR : MIRror a directory tree - equivalent to /PURGE plus all subfolders (/E)

That's why it's adding the /PURGE

  • 0

That's what I get for doing this before my morning coffee. I copied this from another backup script I had. I actually do want /purge, not /mir. So that issue is solved

Also, forgot to mention that I've tried adding the /v switch, but it doesn't show in the log what dir/files were skipped.


set options=/L /s /e /purge /dcopy:T /copy:DAT /xa:h /LOG+:%LogFile% /v
[/CODE]

  • 0

Looking at RIchCopy now. I don't see how to get a command line string from it.

Edit: Nevermind, it's on the Others tab. It's confusing. There's arguments that aren't listed in the Robocopy help.

/QA and /QP

And besides the source and destination, it wants to do something with "C:\Users\unknownsoldierx\AppData\Local\Temp\clEE55.tmp".

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Luck you. I get that pop up even after leaving the site for a bit and do some other surfing around and then come back.
    • It depends if they can market it to hipsters, then they might hold a niche.
    • No Man's Sky Beacon update overhauls settlements and player overseer duties by Pulasthi Ariyasinghe Hello Games is back with another major update to its sci-fi space survival game No Man's Sky. This time, it has targeted settlement systems. The title will now let players be overseers who manage settlements across multiple planets while also discovering towns run entirely by robotic lifeforms. Space-faring players can now be the overseers of four settlements across the universe, with the job being offered to them after completing a unique objective. "Govern your settlers wisely and invest in their infrastructure to enable each settlement to flourish, producing lucrative resources, and becoming an invaluable base of operations throughout your journey," explains the studio. Settlement management has also been completely reworked with this update. Hello Games says that players will now have more important construction and upgrade choices, as each building has its own calculated contribution to the happiness, population, and productivity of its settlement. These can benefit the player via a wide range of resource production options. Not only that, each settler will even have their own personalities, strengths, weaknesses, and skills that will change how they work in their community. Players can find these by simply talking to any settler they meet on a planet. When a citizen dispute comes up, the number of choices offered to the overseer has been increased as well. As for the robotic settlements, they can only be found by scanning planets with specialist technology. Once found, these Autophage settlements can be taken over as well, letting players be the overseer and take care of the scrap metal-built locals. Other additions to this update include Intel Xe Super Sampling (XeSS) upscaling tech support on PC, more voice types for player characters, better snapping when building structures, and cross-save support across all platforms. Don't forget that No Man's Sky will soon be arriving on a brand-new platform too. The title will be a day-one launch on the Nintendo Switch 2 on June 5. Find the complete patch notes for No Man's Sky 5.7 Beacon Update over here.
  • Recent Achievements

    • Week One Done
      mywakehealth earned a badge
      Week One Done
    • Dedicated
      jbatch earned a badge
      Dedicated
    • Week One Done
      Leonard grant earned a badge
      Week One Done
    • One Month Later
      portacnb1 earned a badge
      One Month Later
    • Week One Done
      portacnb1 earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      294
    2. 2
      snowy owl
      160
    3. 3
      +FloatingFatMan
      155
    4. 4
      ATLien_0
      142
    5. 5
      Xenon
      126
  • Tell a friend

    Love Neowin? Tell a friend!