Code: Select all
execute("copy DH1:Empty_WBPattern.prefs ENV:Sys/WBPattern.prefs") ; works
copyfile("DH1:Empty_WBPattern.prefs", "ENV:Sys/WBPattern.prefs") ; write-error
Code: Select all
execute("copy DH1:Empty_WBPattern.prefs ENV:Sys/WBPattern.prefs") ; works
copyfile("DH1:Empty_WBPattern.prefs", "ENV:Sys/WBPattern.prefs") ; write-error
Remember that you have to give a directory as the destination for the CopyFile() function, not a file name. Now it probably tries to access/create a "WBPattern.prefs/" directory but fails because there's a file with the same name already. If you want to define the destination file name, use the NewName table field, but in this case you can just use "ENV:Sys" as the destination.fingus wrote: ↑Tue Dec 12, 2023 11:09 amCode: Select all
copyfile("DH1:Empty_WBPattern.prefs", "ENV:Sys/WBPattern.prefs") ; write-error
Thanks for the hint and your help, its working now.jPV wrote: ↑Wed Dec 13, 2023 8:15 amRemember that you have to give a directory as the destination for the CopyFile() function, not a file name. Now it probably tries to access/create a "WBPattern.prefs/" directory but fails because there's a file with the same name already. If you want to define the destination file name, use the NewName table field, but in this case you can just use "ENV:Sys" as the destination.fingus wrote: ↑Tue Dec 12, 2023 11:09 amCode: Select all
copyfile("DH1:Empty_WBPattern.prefs", "ENV:Sys/WBPattern.prefs") ; write-error