Announcement

Collapse
No announcement yet.

long filenames

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • long filenames

    Hi guys, I have a simple problem why trying to shell a program to a long filename.

    I am doing the following:

    fun$="DIR > file1"
    shell fun$

    fun$="COPY file1 longfilename2"
    shell fun$


    Under window$ '95, "longfilename2" is created - everything okay
    However, under window$ '2000, "longfile" is created. Why is my filename getting truncated ?

    Thankyou for any help you can provide !

    Daniel Buttigieg

    ------------------
    mailto:[email protected][email protected]</A>
    mailto:[email protected][email protected]</A>

  • #2
    Not sure if this will work (dont have 2000)
    Put the filenames in quotes before you shell
    copy "file1" "verylongfilename"
    i.e.
    s$="copy "+chr$(34)+"file1"+chr$(34,32,34)+"verylongfilename"+chr$(34)
    shell s$

    ------------------

    Comment


    • #3
      NT and Windows 2000 come with two command shells, 16-bit and 32-bit, just to confuse things.
      If your application invokes the 16-bit command shell, you won't have access to long filenames!
      So, it might be better to make your own copy routine. The Downloads area here has a number of
      packages that provide PB/DOS with long filename support.

      ------------------
      Tom Hanlin
      PowerBASIC Staff

      Comment

      Working...
      X