No announcement yet.

Copy clipboard from PBDOS to w2k

  • Filter
  • Time
  • Show
Clear All
new posts

  • Copy clipboard from PBDOS to w2k

    1.) I used PBWINCLP.BAS to copy from PowerBasic to Clipboard of Windows. This worked fine with Windows 9x. But with Win2000 i don´t have any success. How can I solve this problem ?
    2.) I need to write the content of a directory to a file with Powerbasic. I use the command shell. In win2000 long filenames are not correctly displayed. When i use dir /N in a shell of a compiled PB Programm there is an error message. How can I work with long filenames under win2000 ?
    Thank you very much.
    G. Buechler

  • #2
    As far as (2) goes, I've seen this on occasion under NT, and the same problem
    is possible under Windows 2000. The problem is, these operating systems support
    two command shells, the 16-bit COMMAND.COM and 32-bit CMD.EXE. It sounds as if
    you're getting the 16-bit command shell instead of the 32-bit command shell,
    either due to a programming error or a system configuration problem.

    Your SHELL statement should, ideally, look something like this:

    SHELL ENVIRON$("COMSPEC") + " /c DIR /N >outfile.txt"

    The ENVIRON$("COMSPEC") part should get you the appropriate command shell. If
    not, you might want to check your environment variables (right-click on
    My Computer, pick the Advanced tab, and check the ComSpec system variable to
    make sure it points to CMD.EXE rather than COMMAND.COM).

    If that doesn't help, it may be that Windows is mucking over your COMSPEC
    settings for "compatibility" purposes. In that case, you might try directly
    specifying the full filespec for CMD.EXE when doing the SHELL.

    Tom Hanlin
    PowerBASIC Staff