Windows 10: Wildcards in Robocopy | Batch file very very basics

Discus and support Wildcards in Robocopy | Batch file very very basics in Windows 10 Support to solve the problem; I have folders that contain files and subfolders. The files have a limited set of extensions. What I seek to do is to robocopy /mir the files... Discussion in 'Windows 10 Support' started by mikeincousa, Sep 28, 2018.

  1. Wildcards in Robocopy | Batch file very very basics


    I have folders that contain files and subfolders. The files have a limited set of extensions.

    What I seek to do is to robocopy /mir the files separately from the subfolders. I have been trying to review wildcard basics. I am not finding any ways to combine them that suits this goal.

    I was thinking something like robocopy source directory files with *.txt (comma or &&) *.pdf…. *.svg….. destination /mir

    If push comes to shove I can build a series of commands in a spreadsheet with one for each extension.

    From what I have seen a batch file would be a cleaner method. Guess I need to go there sooner than later now.

    I am vaguely recalling that I need some basic code that defines a variable, indexes the extensions, and runs a for next loop?

    I found this discussion but quickly became lost in the details. Maybe I am in the wrong place?
    Robocopy and For loops in batch file
    ex.
    for /f %%i in (c:\temp\comps.txt) do robocopy.exe c:\file_ini "\\%%i\c$\Program Files\usbdlm" usbdlm.ini

    I get "for". Do not get "%%." "In" would be the source file? "do" is the execution command? The rest is somehow setting the destination? Does not this need some sort of "next" until or something like that.

    Any guidance or background that speaks to the mission will be appreciated.

    Thanks.

    :)
     
    mikeincousa, Sep 28, 2018
    #1
  2. Binky_875 Win User

    Repeat RoboCopy batch file in Windows 10 gives different results.

    Action taken as suggested.

    Same question now exists here
    HERE
    .
     
    Binky_875, Sep 28, 2018
    #2
  3. Binky_875 Win User
    Repeat RoboCopy batch file in Windows 10 gives different results.

    Running Windows 10 Pro 64 bit with standard supplied RoboCopy.

    Having said that, I believe the same symptoms were exhibited on Windows 7 Ultimate 64bit (which was updated).

    Basically I have a batch file which copies data from a 'non changing (by the OS)' drive to a backup drive.

    If it has been run and completed so both drives are in sync, I can run the batch file again and it runs very quickly, BUT can sometimes give a different number of files in the drive. i.e. running it back to back gives different file count, even when the
    2 drives are in sync.

    Either this is related to caching of the drives, or RoboCopy not counting correctly when using multiple threads.

    I would appreciate a definitive answer so that I can automatically test for files that are synced and provide a YES/NO to it having worked okay.

    Regards Binky
     
    Binky_875, Sep 28, 2018
    #3
  4. fpefpe Win User

    Wildcards in Robocopy | Batch file very very basics

    Robocopy switches

    Hello -- one of the many switches that robocopy has is /xf -- to exclude file(s) that are to copy (not) copied --- the help (https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy) note that I can specify "wildcards
    * and ? for the filename ---

    So I specified the option

    /xf foo.*

    and I got a error that this option was invalid

    Strictly speaking is the help noted that the filename, ie the part of the file identifier before the '.' can have the wildcard and not

    the file extension/type?

    Thanks in advance
     
    fpefpe, Sep 28, 2018
    #4
Thema:

Wildcards in Robocopy | Batch file very very basics

Loading...
  1. Wildcards in Robocopy | Batch file very very basics - Similar Threads - Wildcards Robocopy Batch

  2. Can Robocopy copy in batches of files?

    in Windows 10 Gaming
    Can Robocopy copy in batches of files?: Evening, I'm just after a bit of help, I have a folder on my PC which has a load of files from my Nikon Camera - for my current example 1700 at around 42GB, I usually copy these to an external SDD but I'm guessing due to the SSD the speed tends to drop off so I start around...
  3. Can Robocopy copy in batches of files?

    in Windows 10 Software and Apps
    Can Robocopy copy in batches of files?: Evening, I'm just after a bit of help, I have a folder on my PC which has a load of files from my Nikon Camera - for my current example 1700 at around 42GB, I usually copy these to an external SDD but I'm guessing due to the SSD the speed tends to drop off so I start around...
  4. Can Robocopy copy in batches of files?

    in Windows 10 Network and Sharing
    Can Robocopy copy in batches of files?: Evening, I'm just after a bit of help, I have a folder on my PC which has a load of files from my Nikon Camera - for my current example 1700 at around 42GB, I usually copy these to an external SDD but I'm guessing due to the SSD the speed tends to drop off so I start around...
  5. Robocopy making disk access very slow

    in Windows 10 Network and Sharing
    Robocopy making disk access very slow: Hello ,I am using Robocopy to periodically copy data media data mp4 video files from Local drive to network drive.When Robocopy is executing copy command, local disk access is very slow and becoming almost unusable to open it.Tried with different thread options 8,16,32 etc....
  6. Robocopy making disk access very slow

    in Windows 10 Gaming
    Robocopy making disk access very slow: Hello ,I am using Robocopy to periodically copy data media data mp4 video files from Local drive to network drive.When Robocopy is executing copy command, local disk access is very slow and becoming almost unusable to open it.Tried with different thread options 8,16,32 etc....
  7. Robocopy making disk access very slow

    in Windows 10 Software and Apps
    Robocopy making disk access very slow: Hello ,I am using Robocopy to periodically copy data media data mp4 video files from Local drive to network drive.When Robocopy is executing copy command, local disk access is very slow and becoming almost unusable to open it.Tried with different thread options 8,16,32 etc....
  8. HOW: Robocopy command to a batch-file

    in Windows 10 Network and Sharing
    HOW: Robocopy command to a batch-file: This working fine in a Command Prompt: robocopy "C:\¤Head Folder\Folder 01\Old folder" "C:\¤Head Folder\Folder 01\New folder" /mov /minage:930 How do I make a Batch file .BAT with that RoboCopy command...
  9. File explorer/search very very very slow

    in Windows 10 BSOD Crashes and Debugging
    File explorer/search very very very slow: Green search bar takes 10+ minutes to complete its progress across the bar .. working on it ... ..... it says - really i think!! Since 20H2 'update' the whole OS seems slow to respond and react, with all apps very slow - obviously suspect the file access an search as the...
  10. Very, very, very, slow to open network share with many files

    in Windows 10 Network and Sharing
    Very, very, very, slow to open network share with many files: I have a Win10 PC on my network with some shared directories, the "server". The share I use most has 23,000 files in 600 folders. When I access that share from a Win 7 PC it opens pretty much instantly, but to open it from my Win 10 PC takes for ever. The green progress bar...

Users found this page by searching for:

  1. windows10 robocopy basics

    ,
  2. does robocopy support wildcards

    ,
  3. windows robocopy file extension wildcard