I can run the command below as a script, and it executes without error. But the file is never copied to E:\Documents.
Can someone tell me what I'm doing wrong?
copy "C:\eBooks\Cooking\Family Recipes.docx|E:\Documents";
Unable to copy file using a script
-
RalphM
- Posts: 2143
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: Unable to copy file using a script
The "|" char is not used to separate source and target of a copy operation, you should look at some examples in the help file.
Ralph 
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
zBernie
- Posts: 181
- Joined: 08 Dec 2016 17:20
Re: Unable to copy file using a script
These examples from the online help doc clearly show the files separated by a "|" character:
Examples
copy "E:\Test\Test.txt|E:\Test\a\alpha.png";
copy "D:\TestD.txt|E:\TestE.txt|F:\TestF.txt";
copy <clp>; //copy (text or items in clipboard) as items, marked as copied
copy <clp>, "cut"; //copy (text or items in clipboard) as items, marked as cut
-
PeterH
- Posts: 2830
- Joined: 21 Nov 2005 20:39
- Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%
Re: Unable to copy file using a script
You did read the documentation of help copy? At least the very first line?
What does it say that it copies to?
What does it say that it copies to?
-
RalphM
- Posts: 2143
- Joined: 27 Jan 2005 23:38
- Location: Cairns, Australia
Re: Unable to copy file using a script
Okay, maybe I should have added: "|" is used to separate different source files but for your intended use you might want to change the command to "copyto" and then you still need to define a target for the operation.
Ralph 
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
(OS: W11 26H2 Home x64 - XY: Current x64 beta - Office 2024 64-bit - Display: 1920x1080 @ 125%)
-
zBernie
- Posts: 181
- Joined: 08 Dec 2016 17:20
XYplorer Beta Club