Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Filename in Basic

  • 21-02-2003 1:48pm
    #1
    Registered Users, Registered Users 2 Posts: 6,240 ✭✭✭


    Hi

    I am having a bit of trouble trying to create a file that has a space in its name.

    at the moment I have a windows dialog for open/save file
    it return the file file name
    eg.

    c:\bas\kevin\number gen\1-100.dbf

    now when I try to create this file .. it wont
    because of the space in number gen .. i presume

    does anyone know how I transfrom this file name into something I can create??

    I am using a varient of basic called power basic


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    If it's a DOS based basic then the problem may be due to the fact it doesn't support long filenames.

    In which case you would have to know the short filename.

    At a guess
    C:\BAS\KEVIN\NUMBERGR.~01\1-100.DBF
    

    I can't guarantee that though I would strongly recommend against using short file names. You would be better off conforming the directory struture to the 8.3 layout.

    If your Powerbasic does support long file names then try wrapping the name in quotes.

    eg.
    filename$ = """c:\bas\kevin\number gen\1-100.dbf"""
    
    ' or
    
    filename$ = chr$(34) + "c:\bas\kevin\number gen\1-100.dbf" + chr$(34)
    


  • Registered Users, Registered Users 2 Posts: 6,240 ✭✭✭hussey


    Thanks Hobbes

    I figured it out ...
    I was using some code I wrote ages ago
    to create a DBF file
    and in it I defined the filename to be 20 characters
    so when I tried to create something with less than that it failed


    I am much a muppet :rolleyes:


Advertisement