Robocopy still copying hidden files

When a user comes on site with their laptop, we provide them the means to backup their laptop docs to a server share.  We also backup the laptop when a user leaves the business in order to have a good backup of the user data before we re-build the laptop.
We currently have a script file using XCopy to copy all of the users data (windows 7) (i.e. My Docs, Pictures, Favorites, etc) to a network archive share folder.
I have been testing Robocopy on the command line to replicate this process.  Whatever I do,when running robocopy - only use files where archive bit is set, and ignore all system, hidden and temp files.  It still starts the backup at the hidden
folder Appdata.
Below is the command I have tried.
robocopy c:\users\(username) \\server\sharename
/s /m /FFT /XA:SHT /Z /W:5 /FP /XJ
What am I missing?  Thanks

Hello,
we have similar needs but didn't want to copy everything from the "User-folder". So I just build a script that will take all the important folders the /MIR will only copy the "new files" so there is not extra stuff. Have you tried your script with different
/options? what does the /MIR do In this scenario?
robocopy.exe /MIR /W:1 /R:1 "%USERPROFILE%\Favorites" "\\ServeShare\Backups$\%username%\%computername%\Favorites"
robocopy.exe /MIR /W:1 /R:1 "%USERPROFILE%\Desktop" "\\ServeShare\Backups$\%username%\%computername%\Desktop"
robocopy.exe /MIR /W:1 /R:1 "%USERPROFILE%\Documents" "\\ServeShare\Backups$\%username%\%computername%\Documents"
robocopy.exe /MIR /W:1 /R:1 "%USERPROFILE%\Pictures" "\\ServeShare\Backups$\%username%\%computername%\Pictures"
robocopy.exe /MIR /W:1 /R:1 "%USERPROFILE%\Videos" "\\ServeShare\Backups$\%username%\%computername%\Videos"
robocopy.exe /MIR /W:1 /R:1 "%APPDATA%\Microsoft\Sticky Notes" "\\ServeShare\Backups$\%username%\%computername%\Sticky Notes"
exit
this is copy of the script we use. You should also always use the %USERPROFILE% env. variable. on the script.

Similar Messages

  • Robocopy command and hidden files

    Hi
    To ensure that the robocopy command copy
    also hidden files of a DVD, there
    need some particular option or not?
    Thanks
    Bye
    Balubeto

    by default, robocopy does copy hidden files.
    You can specify an attribute filter:
    /IA:[RASHCNETO] :: Include only files with any of the given Attributes set.
    /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.
    get more info by running robocopy /?
    MCP/MCSA/MCTS/MCITP

  • How do I not copy hidden files associated with photos

    I want to put photos on my new digital picture frame. It can be plugged into a USB port and looks like a disk drive.
    I select and drag the photos I want to the device, but there is a hidden file for each one that gets copied as well. The device doesn't know what to do with those files. They don't cause a problem, but do take up space.
    How can I keep from copying those files?

    I'd like to be able to see the hidden files in the Finder so that I (hopefully) could select them and delete them before transferring the files to my digital photo frame.
    When you saw and deleted them using Terminal, were they present on your HD, or did you only look at the files already transferred to the USB photo frame device?
    The hidden "._" files are "resource fork" files, and when you make hidden files visible in Finder you might find that they exist only on the USB device, having been created there by the transfer process itself - see:
    *Apple Double Format Creates File Name With the Prefix '._'*
    http://support.apple.com/kb/TA20578?viewlocale=en_US
    Also take a look at [Blue Harvest|http://www.zeroonetwenty.com/blueharvest].
    They don't cause a problem, but do take up space.
    How much space? If not excessive, then leaving them alone would also be an option!

  • Can't get hidden files to show in finder

    I have tried multiple methods to get hidden files to be shown in Finder including the Terminal command:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
    I have also tried using Revealer and still no hidden files are shown. 
    Using Mavericks 10.9.x (latest version)
    Can't find the com.apple.finder file anywhere in Library either.
    Thanks in advance

    In that event there is something else wrong with your Mac.  You wouldn't have happened to have installed MacKeeper.  If you did, that's the reason why, and you can only fix that with this tip:
    https://discussions.apple.com/docs/DOC-3036
    Other reasons why, may be on this tip:
    https://discussions.apple.com/docs/DOC-6921

  • Using robocopy to copy files from a network share over a WinRS command line session

    Hello,
    Preface: Using server 2008 enterprise.
    I can't seem to get robocopy to function over WinRS and I'm not sure where the problem actually lies.  Running robocopy locally on the computer does work fine, but as soon as I try to run it through a remote command prompt through the WinRS client or directly with the WinRS client I get an access denied message (error 5).
    I've tried using runas while logged into the remote command prompt as well, thinking that it could have been some sort of permissions inheritence issue.
    I've checked the permissions on the remote file share, I've even given 'Everyone', 'Anonymous Logon' and the computer's active directory account full control over the folder and the file I'm trying to copy, but still get the access denied error.
    I've tried using /COPY:DT since I read that usually resolved error 5 issues.
    None of these things have worked.
    I'm kind of out of ideas, I've read some blogs of people who have written powershell scripts which use winrm/robocopy so I figure I'm missing something stupid.  Or maybe I've stumbled upon a bug?
    C:\>robocopy \\192.168.100.1\share c:\test example.exe
       ROBOCOPY     ::     Robust File Copy for Windows
      Started : Mon Feb 09 17:35:32 2009
    2009/02/09 17:35:32 ERROR 5 (0x00000005) Getting File System Type of Source \\192.168.100.1\share\
    Access is denied.
       Source - \\192.168.100.1\share\
         Dest : c:\test\
        Files : example.exe
      Options : /COPY:DAT /R:1000000 /W:30
    2009/02/09 17:35:32 ERROR 5 (0x00000005) Accessing Source Directory \\192.168.100.1\share\
    Access is denied.

    Yep, I verified permissions on them all :(
    To maybe complicate the issue, I looked at the environment variables for myself while logged in locally to the computer and through WinRS and they look to be the same.   
    EDIT: Out of pure frustration I wrote a quick console application which impersonates the currently logged in user and copies a file from the network share I'm trying to access to the local computer.  The application properly impersonates the user - but does not copy the files while it's run through WinRM.  When you run the application as a locally logged in user it works just fine.
    WinRM must be behaving goofy :(
     This is the output of the following application:
    C:\Windows\System32>test.exe 
    Name: domain\loggedinuser 
    IsAuthenticated: True 
    User: {GUID} 
    AuthenticationType: Kerberos 
    Destination directory doesn't exist, creating new directory.. 
    Undoing impersonation.. 
    No exceptions, no nothing :(
    Imports System.IO 
    Imports System.IO.File 
    Module Module1 
       Dim impersonationContext As System.Security.Principal.WindowsImpersonationContext 
       Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentity 
       Dim cpr As New copyProgress(AddressOf FileCopyProgress) 
       Dim destinationDir As DirectoryInfo = New DirectoryInfo("c:\destination\") 
       Private Delegate Function copyProgress(ByVal totalFileSize As Int64, ByVal totalBytesTransferred As Int64, ByVal streamSize As Int64, ByVal streamBytesTransferred As Int64, ByVal dwStreamNumber As Int32, ByVal dwCallbackReason As Int32, ByVal hSourceFile As Int32, ByVal hDestinationFile As Int32, ByVal lpData As Int32) As Int32 
       Private Declare Auto Function CopyFile Lib "kernel32.dll" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal lpProgressRoutine As copyProgress, ByVal lpData As Int32, ByVal lpBool As Int32, ByVal dwCopyFlags As Int32) As Int32 
       Private Function FileCopyProgress(ByVal totalFileSize As Int64, ByVal totalBytesTransferred As Int64, ByVal streamSize As Int64, ByVal streamBytesTransferred As Int64, ByVal dwStreamNumber As Int32, ByVal dwCallbackReason As Int32, ByVal hSourceFile As Int32, ByVal hDestinationFile As Int32, ByVal lpData As Int32) As Int32 
       End Function 
       Private Function FileCopyProgress2(ByVal totalFileSize As Int64, ByVal totalBytesTransferred As Int64, ByVal streamSize As Int64, ByVal streamBytesTransferred As Int64, ByVal dwStreamNumber As Int32, ByVal dwCallbackReason As Int32, ByVal hSourceFile As Int32, ByVal hDestinationFile As Int32, ByVal lpData As Int32) As Int32 
       End Function 
       Sub Main() 
          Try 
             currentWindowsIdentity = CType(System.Security.Principal.WindowsIdentity.GetCurrent, System.Security.Principal.WindowsIdentity) 
             impersonationContext = currentWindowsIdentity.Impersonate() 
             Console.WriteLine("Name: " & currentWindowsIdentity.Name) 
             Console.WriteLine("IsAuthenticated: " & currentWindowsIdentity.IsAuthenticated) 
             Console.WriteLine("User: " & currentWindowsIdentity.User.ToString) 
             Console.WriteLine("AuthenticationType: " & currentWindowsIdentity.AuthenticationType) 
             If Not destinationDir.Exists Then 
                Console.WriteLine("Destination directory doesn't exist, creating new directory..") 
                destinationDir.Create() 
             End If 
             CopyFile(Path.Combine("\\192.168.100.1\share\", "example.exe"), Path.Combine("c:\destination\", "example.exe"), cpr, 0, 0, 0) 
          Catch ex As Exception 
             Console.WriteLine(ex.ToString) 
          Finally 
             Console.WriteLine("Undoing impersonation..") 
             impersonationContext.Undo() 
          End Try 
          Console.ReadKey() 
       End Sub 
    End Module 

  • Windows Server 2012 R2 robocopy not copying inherited directory permission from source file server to destination ?

    Can anyone here please help me with Robocopy on Windows Server 2012 R2 to copy the file server content from \\OldFileServer\Data share into the local S:\Data drive ?
    here's my script that I use to copy 11 TB of file server contents:
    robocopy.exe "\\OLDFILESERVER\Data" S:\Data *.* /E /SECFIX /SEC /XO /ZB /COPYALL /MIR /DCOPY:DAT /R:0 /W:0 /NP /NFL /NDL /TEE /LOG:"G:\robocopy.log"
    Any kind of help and assistance would be greatly appreciated.
    Thanks
    /* Server Support Specialist */

    Hi,
    Based on my tests, inherited permissions will not be copied using robocopy.exe.
    That’s because that after we copy or move an objects to another volume, the object inherits the permissions of its new parent folder.
    My suggestion for you is to disable the inheritance on corresponding subfolders, and Convert inherited permissions into explicit permissions on this object. After that, those permissions can be copied.
    Here are some references below for you:
    Robocopy not copying NTFS permissions
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/b36748cd-14d1-47a5-9fb6-878ca93ad6fc/robocopy-not-copying-ntfs-permissions
    How permissions are handled when you copy and move files and folders
    http://support.microsoft.com/kb/310316
    Powershell ACL commands? NTFS Permissions - Turn inherited permissions into explicit permissions and remove inheritance
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/884e2837-ec1d-4937-83a5-722cd00d7d16/powershell-acl-commands-ntfs-permissions-turn-inherited-permissions-into-explicit-permissions-and?forum=ITCG
    Best Regards,
    Amy

  • 10.6.3  -   still error 36 file copy errors

    After getting a new mac with 10.6 I started having problems copying files, namely that copying aborts with error 36 quite frequently. I never had such problems on my old powermac with 10.3.9. After some reading here, I discovered this was a known 10.6 problem when copying to windows formatted disks.
    Recently I let my mac upgrade itself to 10.6.3. One of the listed fixes was for file copies to windows servers. Unfortunately, I'm still getting error 36's. I have 2 ways that I transfer files which yield lots of error 36's :
    First is with USB thumb drives formatted FAT32, for backup and taking files back and forth from home/office & pc/mac. I haven't yet experienced a problem with this in 10.6.3, but really I also haven't transferred many files this way yet, so can't say for sure whether the issue is fixed here or not.
    Second way is uploading completed projects (mostly pdf's) to our corporate site via internet, doing a "connect to server" with afp://mycompanysite.com. I have no idea what server/software they are running with that, but I still get consistent error 36's when uploading files to it. If I make that afp connection with my ancient 10.3.9 powermac, I can transfer files all day without any errors, so...
    obviously Apple still hasn't quite fixed the file transfer problem!!
    Help, Apple, Help!!!!!

    Louie Petit wrote:
    Thank you for your reply, Charles.
    1. I thought that this thread was about Finder in 10.6.3 generating Error -36 errors when trying to copy files to an external drive, which is what I wrote about.
    Yeah, but it appears that the OP had a different problem.
    2. i know that I shouldn't have to force-eject DVD-RAMs; I mentioned that precisely because it is unusual. I was hoping that by raising all the problems that I noticed, maybe someone would recognize something that would lead to a solution.
    If you have to force-eject discs, odds are that you have a problem directly related to that device.
    3. Hardware problem is unlikely. The drive works fine in all respects with my older (17") iMac running OSX 10.4.11; the drive works fine with the new iMac running OSX 10.6.3, when copying any size file to or from a DVD-R or DVD-RW disk; the drive also works fine with the new iMac when copying small files (less than 1.4MB or so) to a DVD-RAM; the drive also works fine when copying any size file FROM a DVD-RAM. The error occurs ONLY when copying a file larger than about 1.4MB to a DVD-RAM. To me, the key point is that it works perfectly with 10.4.11, but not with 10.6.3. The only other difference is that with the old iMac I used the Firewire 400 port, and the new one is 800 (so I use a converter cable); but i don't think that would explain why there is no problem with DVD-R and DVD-RW, nor with small files, nor with copying from the drive to the iMac.
    It would appear that there's a software problem somewhere which relates directly to that device. You need to check the drivers.
    4. The mechanism is TSSTcorp CDDVDW SH - 5203N, firmware version LA00 (which is the latest). I have already contacted LaCie about this as well. They don't know why it doesn't work, either. But, on the other hand, they admitted that they do not know of anyone who does have 10.6.3 and IS able to copy larger files to a DVD-RAM. Do you?
    Nope. Most people around here use DVD-Rs or DVD-RWs, not DVD-RAMs. I've not heard of that particular model DVD-RAM.
    Thank you.

  • Using Terminal to copy all files (hidden and not hidden) and folders from one place to another

    How -using Terminal- can I copy all files (hidden and not hidden) and folders (and their contents) from one place to another

    ditto
    DITTO(1)                  BSD General Commands Manual                 DITTO(1)
    NAME
         ditto -- copy directory hierarchies, create and extract archives
    SYNOPSIS
         ditto [-v] [-V] [-X] [<options>] src ... dst_directory
         ditto [-v] [-V] [<options>] src_file dst_file
         ditto -c [-z | -j | -k] [-v] [-V] [-X] [<options>] src dst_archive
         ditto -x [-z | -j | -k] [-v] [-V] [<options>] src_archive ...
               dst_directory
         ditto -h | --help
    DESCRIPTION
         In its first form, ditto copies one or more source files or directories
         to a destination directory.  If the destination directory does not exist
         it will be created before the first source is copied.  If the destination
         directory already exists then the source directories are merged with the
         previous contents of the destination.

  • Copy without those unwanted hidden files ._

    When I copy music files to a USB stick for use in my car system, the car system shows those hidden files, starting with a ._
    How can I copy files to the USB stick without having those files, other than using a Win computer?

    There is a built-in command to clean those files, dot_clean.
    In a Terminal window, typedot_clean -m Make sure you leave a space, but don't hit return, yet. Drag a directory that has those files to the terminal window and hit return. It will merge any metadata with the main file and get rid of the ._ files.
    To read about the options for dot_clean, type man dot_clean in the terminal and you can read the manual page for it.
    The basics are:
    -f to just work on that directory, not any subdirectories.
    -m tells it to delete the ._ files even if it cannot merge the metadata
    I don't know anything about BlueHarvest, so I can't compare except to note that if you don't like playing in the terminal, BlueHarvest will put a GUI face on the process.

  • ITunes 11.0.4 still copying files to media library after dragging and dropping while holding down "option"

    I'm having trouble adding media without automatically copying the file to the iTunes media libary after dragging and dropping while holding down "option."
    In Preferences > Advanced, "Copy files to iTunes media folder when adding to library" is checked. When I drag a file into iTunes while holding "option", the green "plus" icon disappears. However, iTunes still copies the file to media folder.
    Any suggestions?

    you can also try:
    I found that if I SCROLL down to the word 'playlist' and hover around the name, a 'show' comes up.  Click on the 'show' and everything magically appears.

  • Copy large files freeze, but internet still ok.

    Hello,
    When I copy a large amount of files, photos here. While it stops and it seems that does not advance. Then cancel the progress and remains in the message "Stopping ..." but not closed. It is as if the connection is freezing but I can access the internet and it seems that the wifi works but does not copy the files.
    I have translated it with google. Because I do not speak good English.
    How could solve this problem?
    Thank you very much!
    manu

    murb83 wrote:
    But, i don't know if this problem is normal to freeze finder (copy losts files with wireless like time machine), to can't turn off the system.
    let's say that a wireless connection is not very reliable when it comes to copying large amounts of data. i'm nor surprised the finder is choking on a 87 GB iPhoto library ...
    JGG

  • How do I find and remove hidden files

    For some reason, after the recent install of SL my 1TB drive is extremely bloated. I have deleted or moved just about everything possible from the disk (excluding system files and applications) and it still shows that I only have 94.08 GB of space available.
    Is there a good piece of software out there that will help me to find out if there are several hidden files and remove what is unnecessary?

    Wow ... that was enlightening. I discovered that somehow there is a hidden folder on the 1TB drive entitled "volumes" and within that folder is a subfolder entitled "Mega Drive" (my self-titled name for the 1TB boot drive), which is an exact duplicate of my previous hard drive.
    A little more about how I got here. I had to computer in to the Apple Store, after upgrading to SL, for what I initially though was a hardware issue. The Genius felt it was software, did an erase and install. When I got the macing back I tried to us Migration Assistant to copy files from my Time Machine drive, it took all night so I wasn't awake when it finished. I suspect that is where this folder came from, as the next day I could not find the information on my computer, so I started manually moving the files from that drive.
    The bottom line is this ... is it safe to remove trash this entire folder?

  • How to delete hidden files that I uploaded to Download folder

    I read posts on delete but am concerned I'll mess something up - I have never used Terminal and am hoping there's an easier way.
    I recently switched from Windows to Mac for my development computer.
    I wanted to edit an .htaccess file for a web site I downloaded it to the downloads folder and of course, because it has a dot as the first character it turns out I can delete it. I was able to edit the htaccess file with Fetch, saved it to a web dev folder and upload it. But I still have an .htaccess file in my Download folder that I would like to remove.
    What is the easiest way to do this?
    Thank you!

    The easiest way is to tell Finder to show hidden files. Open Terminal and copy this to Terminal window:
    defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder
    Then, go to Downloads folder and delete the file. Finally, return to Terminal and copy the same text but replacing TRUE for FALSE.
    Alternatively, if you know the name of the file, you can move to Downloads folder in Terminal with the cd command and use the rm command to delete the file, but it's dangerous. Don't do it unless you are sure what you are doing, and make a backup

  • The hidden files on my macbook air keep showing up!

    The hidden files on my macbook air keep showing up! I use different methodes to hide them, but every time, out of the blue, all those horrible 'windows like' .docs show up. I used Paralles 5 (have deleted it - no change), even updated to Lion, no change.. Deleted MacFuse.. no change... I suspected ThinkerTool, but also that one is gone...  Files most of the time show as soon as I open a desktop folder... HELP anyone??

    Dear People,
    After month I'm still struggeling. Like I said, it is not just a replace True with False sollution. When I hide the 'hidden files' and I copy a file to my desktop, the screen flashes and boom... there are my hidden files again.
    I can keep on hiding them, but they will keep showing up.... what to do?

  • Show hidden files won't stick

    Hi,
    I'm setting up an i7 Mac Mini with Mavericks and trying to show hidden files. Using Terminal I do the old
    $ defaults write com.apple.finder AppleShowAllFiles TRUE
    $ killall Finder
    But hidden files are still invisible.
    When I try to read back it reports:
    The domain/default pair of ([...]com.apple.finder, AppleShowAllFiles) does not exist
    I've opened the plist up in XCode and every time I add it there it disappears as soon as I issue the `killall Finder` command.
    Anybody know why this might be?

    Back up all data.
    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
    I've tested these instructions only with the Safari web browser. If you use another browser, they may not work as described.
    Step 1
    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box markedAllow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.
    Triple-click anywhere in the following line on this page to select it:
    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2>&-
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). I've tested these instructions only with the Safari web browser. If you use  another browser, you may have to press the return key after pasting.
    You'll be prompted for your login password. Nothing will be displayed when you type it. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The command may take a few minutes to run, or perhaps longer if you have literally millions of files in your home folder. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
    Step 2 (optional)
    Take this step only if you have trouble with Step 1 or if it doesn't solve the problem.
    Boot into Recovery. When the OS X Utilities screen appears, select
    Utilities ▹ Terminal
    from the menu bar. A Terminal window will open.
    In the Terminal window, type this:
    res
    Press the tab key. The partial command you typed will automatically be completed to this:
    resetpassword
    Press return. A Reset Password window will open. You’re not going to reset a password.
    Select the startup volume ("Macintosh HD," unless you gave it a different name) if it's not already selected.
    Select your username from the menu labeled Select the user account if it's not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select
     ▹ Restart
    from the menu bar.

Maybe you are looking for

  • Access my MacPro (1st gen/ML) with iPhone (Back to My Mac or VPN etc)?

    i had a need the other day to send a file that was stored on my desktop. does anyone know if i can get Back to My Mac working on my iPhone for a first generation mac pro running Mountain Lion or if there is an alternate method to have access to this

  • Hard drive data cable issues

    I have a 2010 13" Macbook pro. It was refurbished when bought in 2011, and I've had it since May of 2011. The first time I had the flashing folder with a question mark was about a year after it was bought in summer 2012, and the data cable connecting

  • When watching a movie in Itunes the sound does not match the lips

    when watching a movie in Itunes the sound does not match the lips, is this normal? & If I purchase a movie will it play like a normal dvd?

  • Persistent of same reference twice - hibernate

    Hello, I tried to save an object - (object1) that is contained by 2 different objects (object2 and object3). first, when i saved object2 - it succeeded and the object was saved (object 2 contains object1) than, i tried to save object3 (that contains

  • Vendor Invoice IDoc integration

    Hello all; I'm familar with IDoc and ALE however I need to impleement a solution quickly to import vendor invoices (against a finished goods purchase order) via the SAP IDoc interface. I have identified IDoc INVOIC02 as my IDoc type however I'm troub