Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
DOS/Other
Tag Cloud
access acer asus bios bsod computer crash desktop dns driver drivers error ethernet excel freeze gaming graphics hard drive hardware hdmi internet laptop malware memory monitor motherboard network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > DOS/Other >
Formatting Robocopy Output?? Is it possible

Reply  
Thread Tools
scrfix's Avatar
Computer Specs
Member with 337 posts.
 
Join Date: May 2009
Experience: Computer Repair Expert
17-Aug-2009, 07:48 PM #1
Formatting Robocopy Output?? Is it possible
I am curious.

When I was using xcopy, I could output to a file and it was formatting nice and neat. Very easy to read. I have attached an example of what I am about to ask.

When using Robocopy, the text starts out in the middle of the screen and a redirect to a .doc file outputs the same thing.

This makes it extremely difficult to read on long folder within folder within folder within folder files.

Is there any way possible to format what the output of robocopy so it starts out at the left end and outputs to the doc file like that as well?

Just curious. I did look in Google under Formatting Robocopy however could not return any decent results. Is it supposed to look like that? Vieww the image. See all the whitespace. Does yours do that? Why?
Attached Thumbnails
Formatting Robocopy Output??  Is it possible-formatting-robocopy.jpg  
__________________
Wayne Leiser, Spectacular Computer Repair Computer Repair, Computer Services
World Famous Gift Baskets: Gift Baskets
Resources LLC: Water Treatment Coagulation, Water Recycling
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
18-Aug-2009, 01:26 AM #2
Posted via Mobile Device
How are you outputting to the document? Are you using any of the logging options in robocopy?
scrfix's Avatar
Computer Specs
Member with 337 posts.
 
Join Date: May 2009
Experience: Computer Repair Expert
18-Aug-2009, 01:28 AM #3
Yes. I am utilizing the /LOG+:"f:\log.doc".
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
18-Aug-2009, 03:48 PM #4
Not sure what you are looking for but my log file looks pretty nicely formatted.
Attached Files
File Type: txt log.txt (2.3 KB, 188 views)
scrfix's Avatar
Computer Specs
Member with 337 posts.
 
Join Date: May 2009
Experience: Computer Repair Expert
24-Aug-2009, 03:35 AM #5
In your log file,

Do you see this line?
16 C:\Program Files\Adobe\Reader 8.0\Resource\Font\

See how far over it is.
I would like it over to the left.

Here is a copy and paste from my word document I paste the log into.

Code:
           C:\users\Public\
                       C:\users\Public\desktop.ini
           C:\users\Public\Desktop\
                       C:\users\Public\Desktop\CamStudio.lnk
                       C:\users\Public\Desktop\CPUID CPU-Z.lnk
                       C:\users\Public\Desktop\DAZ Studio 3.lnk
                       C:\users\Public\Desktop\desktop.ini
                       C:\users\Public\Desktop\FineCrypt.lnk
                       C:\users\Public\Desktop\Wireshark.lnk
           C:\users\Public\Documents\
                       C:\users\Public\Documents\desktop.ini
           C:\users\Public\Documents\microsoft\
           C:\users\Public\Documents\microsoft\IdentityCRL\
           C:\users\Public\Documents\microsoft\IdentityCRL\production\
           C:\users\Public\Downloads\
                       C:\users\Public\Downloads\desktop.ini
           C:\users\Public\Favorites\
           C:\users\Public\Music\
                       C:\users\Public\Music\desktop.ini
           C:\users\Public\Music\Sample Music\
                       C:\users\Public\Music\Sample Music\AlbumArt_{208F236E-B511-4949-BDF9-3791602ED53A}_Large.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{208F236E-B511-4949-BDF9-3791602ED53A}_Small.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{2BEDE989-0477-48C8-8E85-D5FC97494EC0}_Large.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{2BEDE989-0477-48C8-8E85-D5FC97494EC0}_Small.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{81244B04-70BE-47F1-9A5E-2026093D598F}_Large.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{81244B04-70BE-47F1-9A5E-2026093D598F}_Small.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{CA6465E3-92B8-4969-B053-E091250B3E3E}_Large.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{CA6465E3-92B8-4969-B053-E091250B3E3E}_Small.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{D4213C57-0F32-4AED-82E0-A6560E1EA35F}_Large.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{D4213C57-0F32-4AED-82E0-A6560E1EA35F}_Small.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{DAAE5A7A-D07D-4C7C-AE7B-E926C737721B}_Large.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{DAAE5A7A-D07D-4C7C-AE7B-E926C737721B}_Small.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{F87D14E5-4DEB-4169-B9EA-D067EBCD4297}_Large.jpg
                       C:\users\Public\Music\Sample Music\AlbumArt_{F87D14E5-4DEB-4169-B9EA-D067EBCD4297}_Small.jpg
                       C:\users\Public\Music\Sample Music\AlbumArtSmall.jpg
                       C:\users\Public\Music\Sample Music\Amanda.wma
                       C:\users\Public\Music\Sample Music\desktop.ini
                       C:\users\Public\Music\Sample Music\Despertar.wma
                       C:\users\Public\Music\Sample Music\Din Din Wo (Little Child).wma
                       C:\users\Public\Music\Sample Music\Distance.wma
                       C:\users\Public\Music\Sample Music\Folder.jpg
                       C:\users\Public\Music\Sample Music\I Guess You're Right.wma
                       C:\users\Public\Music\Sample Music\I Ka Barra (Your Work).wma
                       C:\users\Public\Music\Sample Music\Love Comes.wma
                       C:\users\Public\Music\Sample Music\Muita Bobeira.wma
                       C:\users\Public\Music\Sample Music\OAM's Blues.wma
                       C:\users\Public\Music\Sample Music\One Step Beyond.wma
                       C:\users\Public\Music\Sample Music\Symphony_No_3.wma
           C:\users\Public\Pictures\
                       C:\users\Public\Pictures\desktop.ini
           C:\users\Public\Pictures\Sample Pictures\
                       C:\users\Public\Pictures\Sample Pictures\Autumn Leaves.jpg
                       C:\users\Public\Pictures\Sample Pictures\Creek.jpg
                       C:\users\Public\Pictures\Sample Pictures\Desert Landscape.jpg
                       C:\users\Public\Pictures\Sample Pictures\desktop.ini
                       C:\users\Public\Pictures\Sample Pictures\Dock.jpg
                       C:\users\Public\Pictures\Sample Pictures\Forest Flowers.jpg
                       C:\users\Public\Pictures\Sample Pictures\Forest.jpg
                       C:\users\Public\Pictures\Sample Pictures\Frangipani Flowers.jpg
                       C:\users\Public\Pictures\Sample Pictures\Garden.jpg
                       C:\users\Public\Pictures\Sample Pictures\Green Sea Turtle.jpg
                       C:\users\Public\Pictures\Sample Pictures\Humpback Whale.jpg
                       C:\users\Public\Pictures\Sample Pictures\Oryx Antelope.jpg
                       C:\users\Public\Pictures\Sample Pictures\Toco Toucan.jpg
                       C:\users\Public\Pictures\Sample Pictures\Tree.jpg
                       C:\users\Public\Pictures\Sample Pictures\Waterfall.jpg
                       C:\users\Public\Pictures\Sample Pictures\Winter Leaves.jpg
           C:\users\Public\Videos\
                       C:\users\Public\Videos\desktop.ini
           C:\users\Public\Videos\Sample Videos\
                       C:\users\Public\Videos\Sample Videos\Bear.wmv
                       C:\users\Public\Videos\Sample Videos\Butterfly.wmv
                       C:\users\Public\Videos\Sample Videos\desktop.ini
                       C:\users\Public\Videos\Sample Videos\Lake.wmv
 
------------------------------------------------------------------------------
 
               Total    Copied   Skipped  Mismatch    FAILED    Extras
    Dirs :        17        14         3         0         0         0
   Files :        60        60         0         0         0         0
   Bytes :   72.87 m   72.87 m         0         0         0         0
   Times :   0:00:50   0:00:49                       0:00:00   0:00:01
 
   Speed :             1559057 Bytes/sec.
   Speed :              89.209 MegaBytes/min.
 
   Ended : Sun Aug 23 22:21:47 2009 
I would like the text telling you what is being copied to be all the way to the left on the screen and in the log file instead of in the middle. I didn't know if this was possible or not.
__________________
Wayne Leiser, Spectacular Computer Repair Computer Repair, Computer Services
World Famous Gift Baskets: Gift Baskets
Resources LLC: Water Treatment Coagulation, Water Recycling
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
24-Aug-2009, 05:03 PM #6
run the file thru a for loop. By default it uses spaces and tabs as delimiters.

Code:
for /f "tokens=*" %%a in (log.txt) do echo %%a>>log2.txt
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 9,048 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
25-Aug-2009, 12:44 AM #7
Even when disabled, it still leaves space for the Progress display and size. If you disable the Class display it does shift it left some.
Would be nice if they would shift things left when the others are disabled, especially the size padding.
You could put the whole command inside a loop, then echo each line to the screen and the log so both would be spaced as you want it.
This will indent the file names by the number of spaces on the Set _Pad= line, and also corrects the Header and summary blocks.
If assumes you don't have a folder or file name that contains Total<4 spaces> Copied":
It depends on the fact that directory names are outputted with a trailing \
Code:
@Echo Off
SetLocal EnableDelayedExpansion
:: Set this to the number of spaces you want in front of the file names, if any.
:: This will also affect the Header and Summary. Be sure to add the spaces if copying from the web
Set _Pad=  
Set _LogFile=C:\Test\RoboLog.txt
For /F "Tokens=*" %%I In ('robocopy "C:\Temp Dir\A_Profile" C:\Test /E /copy:DATS /R:1 /w:5 /np /ns /nc /L') Do (
Set _tmp1=%%I
Set _tmp2=%%~nI
If Not Defined _tmp2 (
  If Defined _tmp1 (
    Set _tmp1=!_tmp1:Source :=%_Pad% Source :!
    Set _tmp1=!_tmp1:Dest :=%_Pad%   Dest :!
    Set _tmp1=!_tmp1:Files :=%_Pad%Files :!
    Echo.!_tmp1!
>>"%_LogFile%" Echo.!_tmp1!
  )
) Else (
  Set _tmp1=!_tmp1:Dirs :=%_Pad% Dirs :!
  Set _tmp1=!_tmp1:Files :=%_Pad%Files :!
  Set _tmp1=!_tmp1:Bytes :=%_Pad%Bytes :!
  Set _tmp1=!_tmp1:Times :=%_Pad%Times :!
  Set _tmp1=!_tmp1:Ended :=%_Pad%Ended :!
  Set _tmp1=!_tmp1:Total    Copied=%_Pad%            Total    Copied!
  Echo.%_Pad%!_tmp1!
>>"%_LogFile%" Echo.%_Pad%!_tmp1!
))
__________________
Microsoft MVP - Windows Expert - Consumer
Of course I know all the answers ; I just don't always match the answers to the right questions

Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:47 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.