PxPlus User Forum

Main Board => Discussions => Language => Topic started by: James Zukowski on August 20, 2020, 10:38:49 AM

Title: CREATE FILE across [WDX]
Post by: James Zukowski on August 20, 2020, 10:38:49 AM
I've tried to use CREATE FILE across a WindX connection, but it doesn't seem to work:

Code: [Select]
create file "[wdx]C:\Users\James\Documents\Foo.pdf" from "/tmp/Foo.pdf"
generates Error #12. If I open the file and try:

Code: [Select]
create file "[wdx]C:\Users\James\Documents\Foo.pdf" from (1)
it generates Error #13.

I'm guessing that this is not part of the current design. If not, could it be considered for the future?
Title: Re: CREATE FILE across [WDX]
Post by: Thomas Bock on August 21, 2020, 01:41:30 AM
The RENAME directive behaves similar: rename "[wdx]a" to "[wdx]b" ---> error 12

I think this is because there are 2 files involved. While one file must exist the other one must be missing.
Title: Re: CREATE FILE across [WDX]
Post by: Mike King on August 21, 2020, 10:11:44 AM
If you want to simply copy a file from the host to WindX you can use the utility we use to provide static downloads = "*plus/wdx/util;Send_to_Wdx"

It takes three arguments:


Where Host pathname is the pathname of the file you want to send, WindX pathname is where you want the file placed on the PC, and a ASCII flag which if non-zero indicates the file is ASCII text thus if sending from Unix/Linux the system will convert the Linux $0a$ line separator to $0d0a$ which is what is used on Windows.

For Example:

call "*plus/wdx/util;Send_to_wdx","arcust","c:\temp\arcust",0

There is an equivalent "Get_From_Wdx" entry point which does the opposite (arg 1 is the WindX file, arg 2 the host).