Xcopy throwing error message


LisaD

New member
Local time
10:29 PM
Posts
3
OS
Windows 11
Good morning. I realize that not many people still use xcopy in Windows 11 for backup, but I back up only 6 folders - no system files. My batch file has always done the job but, today it does not work, giving me what seems like a nonsensical msg. I am copying from my MSI laptop to a desktop computer. kitchen is the name of the target computer. I'm sure it's something simple that I am blind to. The code is exactly the same in all the other lines except for the folder names. Suggestions appreciated. Thanks.

This is the line that stopped working:
xcopy /d/s/h/y C:\Users\lisa\Desktop\*.* kitchen\E\MSIDesktopFiles\
Msg: Cannot perform a cyclic copy.

OS Version: Microsoft Windows 11 Home, 64 bit, Build 26200, Installed 20241225110553.000000-300
Processor: AMD Ryzen 7 7735HS with Radeon Graphics, AMD64 Family 25 Model 68 Stepping 1, CPU Count: 16
Total Physical RAM: 32 GB
Graphics Card: NVIDIA GeForce RTX 4060 Laptop GPU
Hard Drives: C: 930 GB (599 GB Free); D: 1863 GB (1862 GB Free);
Motherboard: Micro-Star International Co., Ltd. MS-16RK, ver REV:1.0, s/n BSS-0123456789
System: American Megatrends International, LLC., ver MSI_NB - 1072009, s/n 9S716RK11203ZR5000135
Antivirus: Malwarebytes, Enabled and Updated
 
Windows Build/Version
OS Version: Microsoft Windows 11 Home, 64 bit, Build 2620

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI
Can you try this way please?

Code:
xcopy /d/s/h/y C:\Users\lisa\Desktop\*.* \\kitchen\E\MSIDesktopFiles\
 

My Computers

System One System Two

  • OS
    All Branches but Release
    Computer type
    Laptop
    Manufacturer/Model
    Acer Nitro ANV15-51
    CPU
    AMD Ryzen 7 7735HS 3200-4500 Mhz 8 cores x 2
    Motherboard
    Sportage_RBH
    Memory
    32 GB DDR5
    Graphics Card(s)
    Radeon Graphic / NVIDIA GeForce RTX 4060 8 GB GDDR6
    Sound Card
    AMD/Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (15.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9 144Hz
    Hard Drives
    KINGSTON OM8SEP4512Q-AA 1TB
    Western Digital 256GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & 1GB Orange-fr
    Browser
    Edge Canary- Firefox Nightly-Chrome Dev-Chrome Dev
    Antivirus
    Windows Defender
  • Operating System
    Windows 11 Beta
    Computer type
    Laptop
    Manufacturer/Model
    Asus X751BP
    CPU
    AMD A9-9420
    Memory
    8 GB of DDR4
    Graphics card(s)
    AMD Radeon R5
    Screen Resolution
    1600x900
    Hard Drives
    Seagate 1 TB
Thank you Oat. Adding the \\ throws a different error: Invalid number of parameters.
I just ran the batch file again with a test file placed in each folder that I want to copy and other than the desktop files it successfully copied the rest to the appropriate folders on the other computer. Could this be a different problem - not sure what it means but the background color of the desktop folder path has changed to red. As far as I know, this generally means that a folder has been compressed, but I haven't compressed this folder.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI
this might help: Xcopy Cannot Perform a Cyclic Copy: What It Means and How to Fix It

Your command line isn't specifying a network directory as the target, but a subdirectory of the current directory when you ran the command. That would make the cyclic copy error possible.

@OAT suggested the modification with \\ because that's the normal way to refer to a network path. Unless you have mapped it to a drive letter

If you are copying to a network drive, robocopy is the most suitable tool. It is designed to be robust. Do read the documentation carefully, it needs a source directory, a target direcory and a file specification. So it isn't like xcopy.
 

My Computers

System One System Two

  • OS
    Windows 11 25H2 Pro Build 26200
    Computer type
    PC/Desktop
    Manufacturer/Model
    MSI PRO ADL-U Cubi 5 (MS-B0A8)
    CPU
    i3-1215U
    Memory
    8GB
    Monitor(s) Displays
    Sony 43" 4k TV
    Screen Resolution
    3840x2160
    Hard Drives
    250GB NVMe M.2 PCIe Gen 3 SSD
    PSU
    External 65W
    Case
    Mini PC
    Browser
    FireFox
    Antivirus
    MS
  • Operating System
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 3070 SFF
    CPU
    Intel i3-9100
    Memory
    16GB DDR4
    Monitor(s) Displays
    Dell S2721
    Screen Resolution
    3840 x 2160
    Hard Drives
    Samsung 500GB nvMe
    Case
    Dell small form factor
    Keyboard
    Cherry mechanical (Blue)
    Mouse
    Microsoft
    Antivirus
    MS Defender
Thank you for your help & suggestions. The script is working now and it turns out that that old expression "Intel inside - idiot outside" is not just a joke. I wasn't going to admit what I had done but perhaps, sometime, someone else might be working when tired and need a simple answer -- also because I now know where I can get answers and didn't want to appear ungrateful for the time you spent answering my question. The problem was that I had earlier logged onto the second computer (kitchen) through Windows Explorer (laptop) which created a folder of the same name on my laptop desktop which created a loop. Without that connection, there is no problem.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    MSI
Back
Top Bottom