RoboCopy not 'seeing' the target files.


BaJohn

Well-known member
Member
Local time
7:44 AM
Posts
205
Location
London
OS
Windows 11 Pro Version 23H2 OS build 22631.3235 (First install 22H2 ‎04/‎10/‎22)
I have been using RoboCopy for many years, without too much trouble.
I copy files from my win 11 PC to (1) another disk on the same machine, (2) a USB attached disk and (3) a NAS system on my local network.
Sometime between 13/10/22 and 16/10/22 the actions changed for the (2) USB process ONLY.
Every single file is copied every single time, rather than just changes and new files.
I have checked and there were no apps or programs updated during that period.
Has anybody any idea why this is occurring?
 
Windows Build/Version
Windows 11 Pro Version 22H2 Installed on ‎04/‎10/‎22 OS build 22621.819

My Computer

System One

  • OS
    Windows 11 Pro Version 23H2 OS build 22631.3235 (First install 22H2 ‎04/‎10/‎22)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus Hand built to my Spec
    CPU
    Intel Core i7 9700K 3.6GHz
    Motherboard
    Asus TUF Z390-Plus Gaming WiFi
    Memory
    32GB DDR4 3.200 MHz
    Graphics Card(s)
    NVidia GeForce RTX 2060 Super 8 GB
    Sound Card
    On Motherboard
    Monitor(s) Displays
    BENQ GL2780E 27"
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 SSDs and 1 HDD
    PSU
    Corsair RM750X Gold - 750w
    Case
    Fractal Design Define R6 Black/Silent Case
    Cooling
    1 CPU fan and 5 case fans
    Keyboard
    Logitech K800
    Mouse
    Logi
    Internet Speed
    200Mbps down 20Mbps up
    Browser
    Edge and Crome
    Antivirus
    Zone Alarm
    Other Info
    Upgraded from Win 10 to Win 11 on 22/10/21.
What is the command used? You give us very little here.

To copy only changed files with Robocopy, you have two options, namely using maxage: n or /XO /maxage:
n. Some users say that they don't want to create all the subfolders on the target disk if there are no new files in them.
In this case, you need to add extra switch /S to exclude the empty folder.
 

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
The guts of it
---------------------------------------
for %%F in ( Downloads
"End User") do (
echo *
echo * Folder %DSK%\%%~F

robocopy "%DSK%:\%%~F" "%NEW%:\TP-Robocopy\Disk %DSK%\%%~F" ^
/e /mir /np /a-:sh /copy:DATS /dcopy:T ^
/z /r:5 /w:2 /mt:8 ^
/xd "$RECYCLE.BIN" "System Volume Information" "RECYCLER" "Temporary Files" "Config.Msi" ^
/xf "pagefile.sys" ^
/log+:%DSK%2%NEW%_RoboCopy.log
)
--------------------------------------
 

My Computer

System One

  • OS
    Windows 11 Pro Version 23H2 OS build 22631.3235 (First install 22H2 ‎04/‎10/‎22)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus Hand built to my Spec
    CPU
    Intel Core i7 9700K 3.6GHz
    Motherboard
    Asus TUF Z390-Plus Gaming WiFi
    Memory
    32GB DDR4 3.200 MHz
    Graphics Card(s)
    NVidia GeForce RTX 2060 Super 8 GB
    Sound Card
    On Motherboard
    Monitor(s) Displays
    BENQ GL2780E 27"
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 SSDs and 1 HDD
    PSU
    Corsair RM750X Gold - 750w
    Case
    Fractal Design Define R6 Black/Silent Case
    Cooling
    1 CPU fan and 5 case fans
    Keyboard
    Logitech K800
    Mouse
    Logi
    Internet Speed
    200Mbps down 20Mbps up
    Browser
    Edge and Crome
    Antivirus
    Zone Alarm
    Other Info
    Upgraded from Win 10 to Win 11 on 22/10/21.
The happy face :D is actually ':' + 'D' - i.e. 2 characters - tried to change it and failed.
 

My Computer

System One

  • OS
    Windows 11 Pro Version 23H2 OS build 22631.3235 (First install 22H2 ‎04/‎10/‎22)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus Hand built to my Spec
    CPU
    Intel Core i7 9700K 3.6GHz
    Motherboard
    Asus TUF Z390-Plus Gaming WiFi
    Memory
    32GB DDR4 3.200 MHz
    Graphics Card(s)
    NVidia GeForce RTX 2060 Super 8 GB
    Sound Card
    On Motherboard
    Monitor(s) Displays
    BENQ GL2780E 27"
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 SSDs and 1 HDD
    PSU
    Corsair RM750X Gold - 750w
    Case
    Fractal Design Define R6 Black/Silent Case
    Cooling
    1 CPU fan and 5 case fans
    Keyboard
    Logitech K800
    Mouse
    Logi
    Internet Speed
    200Mbps down 20Mbps up
    Browser
    Edge and Crome
    Antivirus
    Zone Alarm
    Other Info
    Upgraded from Win 10 to Win 11 on 22/10/21.
You are using /mir which is a mirror image of a complete directory tree.
So everything will always be copied.

Replace /mir with /XO /S (XO stands for Older file(s) - S stands for Copy subs but not empty ones)
 

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
You are using /mir which is a mirror image of a complete directory tree.
So everything will always be copied.

Replace /mir with /XO /S (XO stands for Older file(s) - S stands for Copy subs but not empty ones)
/MIR will mirror the source and it will ignore files that have not been changed if there is a /XO. I do this frequently with both /MIR and /XO. However, the OP stated it has been working correctly and it still does on another hard drive and his NAS. It's just the USB drive that it is not working correctly.

BaJohn, can you try it with a different USB drive?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
Good point Rick. Thanks.
 

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
Do you mean a different USB port or actually a different USB 'portable disc drive', as I have the former but not the later?
Remember the current USB drive was working happily for over 2 years.
The problem has only occurred about 5 weeks ago.
Something must have changed - I know things update in the background - but what?
 

My Computer

System One

  • OS
    Windows 11 Pro Version 23H2 OS build 22631.3235 (First install 22H2 ‎04/‎10/‎22)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Asus Hand built to my Spec
    CPU
    Intel Core i7 9700K 3.6GHz
    Motherboard
    Asus TUF Z390-Plus Gaming WiFi
    Memory
    32GB DDR4 3.200 MHz
    Graphics Card(s)
    NVidia GeForce RTX 2060 Super 8 GB
    Sound Card
    On Motherboard
    Monitor(s) Displays
    BENQ GL2780E 27"
    Screen Resolution
    1920 x 1080
    Hard Drives
    2 SSDs and 1 HDD
    PSU
    Corsair RM750X Gold - 750w
    Case
    Fractal Design Define R6 Black/Silent Case
    Cooling
    1 CPU fan and 5 case fans
    Keyboard
    Logitech K800
    Mouse
    Logi
    Internet Speed
    200Mbps down 20Mbps up
    Browser
    Edge and Crome
    Antivirus
    Zone Alarm
    Other Info
    Upgraded from Win 10 to Win 11 on 22/10/21.
Quick question as I take a glance at this:

Are the following 2 lines meant to really be 2 separate lines or should that be a single line of text?

for %%F in ( Downloads "End User") do (

Should that line look line this?

for %%F in ( Downloads "End User") do (

I'm not trying to say that this is part of the problem, just want to be sure I understand what this is really supposed to look like before a dive in.

BTW, to get better formatting and avoid stuff like that smily face drop a code tag in using this:

Image1.jpg

Then drop the code between the tags. In this case, when it asked what kind of code it was, I also selected batch rather than just general.

The end result:

Batch:
for %%F in ( Downloads
"End User") do (
echo *
echo * Folder %DSK%\%%~F

robocopy "%DSK%:\%%~F" "%NEW%:\TP-Robocopy\Disk %DSK%\%%~F" ^
/e /mir /np /a-:sh /copy:DATS /dcopy:T ^
/z /r:5 /w:2 /mt:8 ^
/xd "$RECYCLE.BIN" "System Volume Information" "RECYCLER" "Temporary Files" "Config.Msi" ^
/xf "pagefile.sys" ^
/log+:%DSK%2%NEW%_RoboCopy.log
)
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
The happy face :D is actually ':' + 'D' - i.e. 2 characters - tried to change it and failed.
Code:
Just a note for posting code. If you select the textr and format it as a code section like this, it wouldn't happen :D.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY Photoshop/Game/tinker build
    CPU
    Intel i9 13900KS 5.7-6GHz P cores/4.4GHz E/5GHz cache
    Motherboard
    Asus ROG Maximus Z790 Dark Hero
    Memory
    64GB (2x32) G.skill Trident Z5 RGB 6400 @6800 MT/s 32-39-39-52
    Graphics Card(s)
    Asus ROG Strix 4070 Ti OC
    Sound Card
    Onboard Audio, Vanatoo Transparent One; Klipsch R-12SWi Sub; Creative Pebble Pro Minimilist
    Monitor(s) Displays
    Eizo CG2730, ViewSonic VP2768
    Screen Resolution
    2560 x 1440p x 2
    Hard Drives
    WDC SN850 1TB nvme, SK-Hynix 2 TB P41 nvme, Raid 0: 1TB 850 EVO + 1TB 860 EVO SSD. Sabrent USB-C DS-SC5B 5-bay docking station: 6TB WDC Black, 6TB Ironwolf Pro; 2x 2TB WDC Black
    PSU
    850W Seasonic Vertex PX-850
    Case
    Fractal Design North XL Mesh, Black Walnut
    Cooling
    EKWB 360 Nucleus Dark AIO w/Phanteks T30-120 fans, 2 Noctua NF-A14 Chromax case fans, 3x50mm fans cooling memory
    Keyboard
    Glorious GMMK TKL mechanical, lubed modded -meh
    Mouse
    Logitech G305 wireless gaming
    Internet Speed
    380 Mb/s down, 12 Mb/s up
    Browser
    Firefox
    Antivirus
    Defender, Macrium Reflect 8 ;-)
    Other Info
    Runs hot. LOL
  • Computer type
    Laptop
    Manufacturer/Model
    Apple 13" Macbook Pro 2020 (m1)
    CPU
    Apple M1
    Screen Resolution
    2560x1600
    Browser
    Firefox
One more idea:

I'm rather slow with some of these weird elements of batch file syntax, but rather good with robocopy syntax. I'd like to see the actual command that is about to be run with robocopy. If you try this, it might help:

Place the word echo before robocopy. Then, just prior to the last closing paren, place a pause. This will cause the program to echo the command that would be run rather than to actually run it. Then it will pause. If you could simply grab the result displayed by the echo command and paste it here I would appreciate it.

This is what I mean:

Batch:
for %%F in ( Downloads
"End User") do (
echo *
echo * Folder %DSK%\%%~F

echo robocopy "%DSK%:\%%~F" "%NEW%:\TP-Robocopy\Disk %DSK%\%%~F" ^
/e /mir /np /a-:sh /copy:DATS /dcopy:T ^
/z /r:5 /w:2 /mt:8 ^
/xd "$RECYCLE.BIN" "System Volume Information" "RECYCLER" "Temporary Files" "Config.Msi" ^
/xf "pagefile.sys" ^
/log+:%DSK%2%NEW%_RoboCopy.log
pause
)
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
I haven't used a USB drive as source for robocopy myself.

When you insert a USB drive, is its policy "quick removal" or "better performance". I can imagine this happening with the former. AAnd often I have found with updates etc., that the policy can revert to "quick removal". Might what to check this out in Computer Management -> disk drives.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    DIY Photoshop/Game/tinker build
    CPU
    Intel i9 13900KS 5.7-6GHz P cores/4.4GHz E/5GHz cache
    Motherboard
    Asus ROG Maximus Z790 Dark Hero
    Memory
    64GB (2x32) G.skill Trident Z5 RGB 6400 @6800 MT/s 32-39-39-52
    Graphics Card(s)
    Asus ROG Strix 4070 Ti OC
    Sound Card
    Onboard Audio, Vanatoo Transparent One; Klipsch R-12SWi Sub; Creative Pebble Pro Minimilist
    Monitor(s) Displays
    Eizo CG2730, ViewSonic VP2768
    Screen Resolution
    2560 x 1440p x 2
    Hard Drives
    WDC SN850 1TB nvme, SK-Hynix 2 TB P41 nvme, Raid 0: 1TB 850 EVO + 1TB 860 EVO SSD. Sabrent USB-C DS-SC5B 5-bay docking station: 6TB WDC Black, 6TB Ironwolf Pro; 2x 2TB WDC Black
    PSU
    850W Seasonic Vertex PX-850
    Case
    Fractal Design North XL Mesh, Black Walnut
    Cooling
    EKWB 360 Nucleus Dark AIO w/Phanteks T30-120 fans, 2 Noctua NF-A14 Chromax case fans, 3x50mm fans cooling memory
    Keyboard
    Glorious GMMK TKL mechanical, lubed modded -meh
    Mouse
    Logitech G305 wireless gaming
    Internet Speed
    380 Mb/s down, 12 Mb/s up
    Browser
    Firefox
    Antivirus
    Defender, Macrium Reflect 8 ;-)
    Other Info
    Runs hot. LOL
  • Computer type
    Laptop
    Manufacturer/Model
    Apple 13" Macbook Pro 2020 (m1)
    CPU
    Apple M1
    Screen Resolution
    2560x1600
    Browser
    Firefox
One idea already.

NOTE: I'm a long way off from complete analysis but try doing this one thing. This is going to sound really weird, but trust me on this. If it pans out, I'll explain later:

One the initial portion of the robocopy command that looks like this:

robocopy "%DSK%:\%%~F"

Please add a single space just before the closing double quote. It should then look like this:

robocopy "%DSK%:\%%~F "

I know this sounds wacko, but please try it!

EDIT: If that does not help, please try the same for the destination folder (add a space before the closing double quote).
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
I haven't used a USB drive as source for robocopy myself.

When you insert a USB drive, is its policy "quick removal" or "better performance". I can imagine this happening with the former. AAnd often I have found with updates etc., that the policy can revert to "quick removal". Might what to check this out in Computer Management -> disk drives.
Unfortunately, that won't make a difference. That affects how data to the device is cached and flushed, but it makes no functional difference in what data is copied to the drive or not. I've had to experiment with this extensively as I copy hundreds of GB a day to flash drives. Not every day, but at least once or twice a week.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
I didn't want to take the time before to explain my odd request with the space before the closing double quote, but now that there is a break in the action, let me do so:

If you hard code a path in the batch file for either the source or destination, so long as you don't terminate the path with a backslash (\), the command should work fine.

However, when working with replaceable variables, I don't know what you may get. The problem occurs when the path ends with a backslash like this:

robocopy "D:\My path\" ....

In this instance, the backslash is used to escape the double quote mark, which you do not want here! As a result, a space is needed between the backslash and double quote mark. Note that even if the path does NOT end with a backslash, this will have no negative impact so it's fine to make this a habit :-).
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Do you mean a different USB port or actually a different USB 'portable disc drive', as I have the former but not the later?
Remember the current USB drive was working happily for over 2 years.
The problem has only occurred about 5 weeks ago.
Something must have changed - I know things update in the background - but what?
I'm thinking a different USB Drive. If I understand this correctly, when robocopy copies to the USB drive, every file is copied to this drive instead of just new or changed files... correct? Something me be changing the timestamp on the USB files in which case they would be new files to robocopy. Perhaps antivirus scanning this device or some other issue with the drive.

Also, why are you wrapping the robocopy command in this batch script? Describe what it's doing as opposed to a standalone command?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
@BaJohn,

There have been a number of posts here since you last responded. I'm particularly interested in see if you could post the info requested in posting #11 of this thread. That will allow us to see the actual robocopy command in text with real values plugged in rather than all the variables and replaceable parameters.

I do, however, have one additional question: Is it EVERY robocopy command run in that loop that is failing now or just some of them? If it is only some, let me know and I will modify the batch file as I have posted it so that we can capture all of the robocopy commands rather than just a single instance.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Every single file is copied every single time, rather than just changes and new files.
Just to avoid misunderstandings, please would you post a screenshot showing that.

All the best,
Denis
 

My Computer

System One

  • OS
    Windows 11 Home x64 Version 23H2 Build 22631.3447
Okay,

I have a new revision of some changes I would like to see made tothe batch file. This is temporary, for testing only.

Below is your original code with the following changes:

1) The block in the middle simple echos the Robocopy command that is about to be run to a text file called Robolog.txt.
2) Before running the FOR loop, it deletes the Robolog.txt file if there was already one so that we have a fresh copy of the file each time we run it.

What this does:

This does not change the behavior of the batch file at all. It merely add the logging of each command being run to a text file. This way we can see the actual Robocopy command in context with the variables replaces by the actual names of files, paths, etc.

This does not log the output from the robocopy commnad. I saw no need to do that since the robocopy command itself is creating a log file.

Batch:
if exist Robolog.txt del Robolog.txt

for %%F in ( Downloads
"End User") do (
echo *
echo * Folder %DSK%\%%~F

echo ------------------ >> Robolog.txt
echo Command: robocopy "%DSK%:\%%~F" "%NEW%:\TP-Robocopy\Disk %DSK%\%%~F" ^
/e /mir /np /a-:sh /copy:DATS /dcopy:T ^
/z /r:5 /w:2 /mt:8 ^
/xd "$RECYCLE.BIN" "System Volume Information" "RECYCLER" "Temporary Files" "Config.Msi" ^
/xf "pagefile.sys" ^
/log+:%DSK%2%NEW%_RoboCopy.log >> Robolog.txt
echo ------------------ >> Robolog.txt
echo. >> Robolog.txt

robocopy "%DSK%:\%%~F" "%NEW%:\TP-Robocopy\Disk %DSK%\%%~F" ^
/e /mir /np /a-:sh /copy:DATS /dcopy:T ^
/z /r:5 /w:2 /mt:8 ^
/xd "$RECYCLE.BIN" "System Volume Information" "RECYCLER" "Temporary Files" "Config.Msi" ^
/xf "pagefile.sys" ^
/log+:%DSK%2%NEW%_RoboCopy.log
)
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
I'm guessing that @BaJohn has lost interest in this issue as there have been no updates since Wednesday :-).
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor

Latest Support Threads

Back
Top Bottom