Page 1 of 2
copyto wildcards .ext
Posted: 16 Aug 2011 13:18
by swan_x
from the help file, in "Scripting Commands" - moveto, copyto, backupto - Source:
< In the case of copyto and moveto, the source(s) may contain wildcards, for example:
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
Copies all *.ini and *dat file from the XYplorer data path to D:\Backup\XY files\2008-04-22\ >
at the end of script i have this folder but is empty!! why this??
Re: copyto wildcards .ext
Posted: 16 Aug 2011 13:19
by nas8e9
swan_x wrote:from the help file, in "Scripting Commands" - moveto, copyto, backupto - Source:
< In the case of copyto and moveto, the source(s) may contain wildcards, for example:
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
Copies all *.ini and *dat file from the XYplorer data path to D:\Backup\XY files\2008-04-22\ >
at the end of script i have this folder but is empty!! why this??
Could you post the exact line you use?
Re: copyto wildcards .ext
Posted: 16 Aug 2011 18:45
by swan_x
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
but the folder is empty!!
Re: copyto wildcards .ext
Posted: 16 Aug 2011 19:56
by highend
Post the full script and the error message of XYplorer (if there is any)...
Re: copyto wildcards .ext
Posted: 16 Aug 2011 20:21
by nas8e9
swan_x wrote:copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
but the folder is empty!!
The above line (with a ";"' at the end) works for me.
Re: copyto wildcards .ext
Posted: 17 Aug 2011 12:16
by swan_x
@ highend
again?? the script is
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
(copy from help of XY, i have indicated where...)
at the end, not have error message, but the folder is empty!!! tryyyy!!
@ nas8e9
i have added ; at the end
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat";
but the result does not change!!
Re: copyto wildcards .ext
Posted: 17 Aug 2011 12:46
by TheQwerty
It might help if you enabled stepping (Scripting menu -> Step Mode) and then executed the script.
When the stepping dialog is shown right click in either the top or bottom section and select "Copy Command (Parsed and Resolved)" and then paste the results here.
Also how are you trying to execute this script?
Re: copyto wildcards .ext
Posted: 17 Aug 2011 13:35
by highend
This is no script, this is a single command (and even this one wasn't complete).
If the usage of wildcards is buggy, write a bugreport and use a simple script instead?
Code: Select all
//...
$destfolder = "D:\Backup\XY files\<date yyyy-mm-dd>";
$datfiles = listfolder(<xydata>, "*.dat", 1, "|");
$inifiles = listfolder(<xydata>, "*.ini", 1, "|");
copyto "$destfolder", "$datfiles";
copyto "$destfolder", "$inifiles";
Re: copyto wildcards .ext
Posted: 18 Aug 2011 11:48
by swan_x
@ TheQwerty
there is no error message!! simply at the end, the folder is empty! try it!
from XY - scripting - run script
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
@ highend
this is not a script??
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
is shown exactly as written in the help file...
this work, creates the folder, but this is EMPTY!! no file .ini, .dat inside!
and this behavior is for any type of file (ex....copyto "D:\Backup\", "C:\*.txt";)
Re: copyto wildcards .ext
Posted: 18 Aug 2011 11:54
by zer0
Please use code tags around your scripts, they are supposed to be formatted that way.
Re: copyto wildcards .ext
Posted: 18 Aug 2011 12:15
by TheQwerty
swan_x wrote:@ TheQwerty
there is no error message!! simply at the end, the folder is empty! try it!
from XY - scripting - run script
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "<xydata>\*.ini|<xydata>\*.dat"
I didn't ask if there was an error, I asked that you enable stepping and copy the resolved and parsed command so that we can verify how XY is interpreting the script.
I asked where you're running the script from because I have tried this script and it works correctly from the address bar.
I'll also add a request that you go to Help->Various Information, copy the contents of the resulting dialog, and paste it into this thread, since knowing XY/OS versions and the relevant paths might help.
Re: copyto wildcards .ext
Posted: 18 Aug 2011 12:32
by swan_x
from the address bar??
i try from scripting - run script....
ok try in step mode...this is a report "resolved and parsed command"
copyto
----
D:\Backup\XY files\2011-08-18
----
D:\apps\XY\Data\*.ini|D:\apps\XY\Data\*.dat
after i have one message, the folder not exist, do you want to create? yes.
now have the folder, but is empty! no file inside!
and this for any type of file!
Re: copyto wildcards .ext
Posted: 18 Aug 2011 12:36
by TheQwerty
Okay, nothing out of the ordinary there - aside from the lack of copying.
How about the information from Help -> Various Information?
Re: copyto wildcards .ext
Posted: 18 Aug 2011 12:40
by swan_x
another ex...
i have 555.txt in C:\
script
copyto "D:\Backup\XY files\<date yyyy-mm-dd>", "C:\*.txt";
same error..."create folder?" yes, new folder in D:\Backup\XY files\ but inside nothing!! no file .txt!!
Re: copyto wildcards .ext
Posted: 18 Aug 2011 12:44
by zer0
Wildcards are not currently supported for SC copyto when customcopy is enabled as per this thread:
http://xyplorer.com/xyfc/viewtopic.php?f=2&t=6828