xcopy not working

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kiltro
Posts: 1
Joined: 08 Apr 2022 03:57

xcopy not working

#1 Post by kiltro » 08 Apr 2022 04:02

Hello everyone!

I've created a simple .bat file with this code

Code: Select all

xcopy /y "C:\Users\utente\Google Drive\Shopify\Sincronia\Shopify.xlsm" "C:\Users\utente\Google Drive\Shopify\Sincronia\Shopify_bak.xlsm"

exit
It doesnt work... doesnt do anything

I must add that these lines of code where part of a bigger one that always worked and stopped doing so, apparently with no reasons, 2/3 weeks ago.

atfon
Posts: 178
Joined: 06 Oct 2017 07:33

Re: xcopy not working

#2 Post by atfon » 08 Apr 2022 10:22

Type the same xcopy command into the command line to see it would fail there too. It is going to ask you to specify if the item is a file or directory. While language dependent, one option is to add "echo F|" in front of your xcopy command:

https://ss64.com/nt/xcopy.html

For a single file, you are better off using the copy command:

https://ss64.com/nt/copy.html

AR Coding
Posts: 53
Joined: 02 May 2021 21:16

Re: xcopy not working

#3 Post by AR Coding » 08 Apr 2022 12:14

Try this:

Code: Select all

copy "C:\Users\utente\Google Drive\Shopify\Sincronia\Shopify.xlsm" "C:\Users\utente\Google Drive\Shopify\Sincronia\Shopify_bak.xlsm"

exit

Post Reply