I want to create a simple script to copy a number of files, After some experiementing I created this script (in Try Script):
copyto "\\192.168.252.108\c$\ETL", "u:\Secu\Exact\Leeg\Klanten\*.*"
Asks Replace or skip (as expected). If I select replace all works.
I wanted to get rid of the prompt so I added
copyto "\\192.168.252.108\c$\ETL", "u:\Secu\Exact\Leeg\Klanten\*.*", 1
Now I get the attached error.
CopyTo Scrips error
Forum rules
READ THIS AND DO IT!!!
Please include the following information:
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
READ THIS AND DO IT!!!
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).
-
KeesButh
- Posts: 15
- Joined: 06 Sep 2023 14:26
CopyTo Scrips error
To see the attached files, you need to log into the forum.
-
highend
- Posts: 14991
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: CopyTo Scrips error
You've set 1 for ^^
would work for example...
Code: Select all
[rootpath]copyto "\\192.168.252.108\c$\ETL", "u:\Secu\Exact\Leeg\Klanten\*.*", 5:=2would work for example...
One of my scripts helped you out? Please donate via Paypal
-
KeesButh
- Posts: 15
- Joined: 06 Sep 2023 14:26
Re: CopyTo Scrips error
I tried these three lines:
copyto "\\192.168.253.108\c$\ETL", "u:\Secu\Exact\Leeg\Klanten\*.*"
//copyto "\\192.168.253.108\c$\ETL", "u:\Secus\Exact\Leeg\Klanten\*.*", 1
//copyto "\\192.168.253.108\c$\ETL", "u:\Secu\Exact\Leeg\Klanten\*.*", "u:\Secu\Exact\Leeg\Klanten"
One works with prompt
Two and three both fail with the same error
Could it be the command length?
copyto "\\192.168.253.108\c$\ETL", "u:\Secu\Exact\Leeg\Klanten\*.*"
//copyto "\\192.168.253.108\c$\ETL", "u:\Secus\Exact\Leeg\Klanten\*.*", 1
//copyto "\\192.168.253.108\c$\ETL", "u:\Secu\Exact\Leeg\Klanten\*.*", "u:\Secu\Exact\Leeg\Klanten"
One works with prompt
Two and three both fail with the same error
Could it be the command length?
-
highend
- Posts: 14991
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: CopyTo Scrips error
Read my post again...
One of my scripts helped you out? Please donate via Paypal
-
KeesButh
- Posts: 15
- Joined: 06 Sep 2023 14:26
Re: CopyTo Scrips error
Thanks that works, but can you explain?
-
highend
- Posts: 14991
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: CopyTo Scrips error
It's setting the 6th parameter to 2 (= Overwrite). Because the syntax counts from 0 and not from 1 it's
5:=2One of my scripts helped you out? Please donate via Paypal
-
KeesButh
- Posts: 15
- Joined: 06 Sep 2023 14:26
Re: CopyTo Scrips error
Thanks for the explanation!
XYplorer Beta Club