PxPlus User Forum

Twitter Twitter Twitter

Author Topic: CREATE FILE across [WDX]  (Read 1037 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
CREATE FILE across [WDX]
« 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?
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Thomas Bock

  • Diamond Member
  • *****
  • Posts: 177
    • View Profile
Re: CREATE FILE across [WDX]
« Reply #1 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.

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: CREATE FILE across [WDX]
« Reply #2 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:

  • Host file pathname (string)
  • WindX file pathname (string)
  • ASCII flag (numeric)

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).

Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com