Results 1 to 5 of 5

Thread: Printing and setting current working directory

  1. #1
    Member
    Join Date
    Jan 2018
    Location
    France
    Age
    71
    Posts
    69
    Rep Power
    13

    Printing and setting current working directory

    Hi,

    I am searching a function to know the current working directory of a bundled exe,
    and also a function to force a new value for current working directory.


    Thanks for help


    Dany

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Dany,

    I usually prefer to compose the absolute paths, using APP_ScriptPath to retrieve the directory where the script lives and then work with that further.

    For example, if your EXE is "c:\myprograms\mycool.exe", then APP_ScriptPath will contain "c:\myprograms\"


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    Member
    Join Date
    Jan 2018
    Location
    France
    Age
    71
    Posts
    69
    Rep Power
    13

    Current working directory

    Hi Petr,

    My long Unix / C background leads me to use a syscall/function to set a current workig directory.
    There,all manipulation of files needs only to know the relative file name instead of rebuilding complete file path.

    Yes, I know I'm lazy.

    Dany

  4. #4
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732
    Hi Dany,

    I see & understand

    Then these will be at your service:
    • DIR_GetCurrent
    • DIR_Change


    Please note you need to do uses "file" to be able to use these.


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #5
    Member
    Join Date
    Jan 2018
    Location
    France
    Age
    71
    Posts
    69
    Rep Power
    13

    Solved

    Quote Originally Posted by Petr Schreiber View Post
    Hi Dany,

    I see & understand

    Then these will be at your service:
    • DIR_GetCurrent
    • DIR_Change


    Please note you need to do uses "file" to be able to use these.


    Petr
    Hi great Petr,


    Exactly what I was looking for.... But I was searching in "FILE_****" or "OS_***" functions.

    Lot of thanks.

    Dany

Similar Threads

  1. Help with printing a .bmp file
    By GeorgeN in forum thinBasic General
    Replies: 8
    Last Post: 14-05-2012, 22:08
  2. font and printing
    By sandyrepope in forum thinAir General
    Replies: 4
    Last Post: 28-01-2008, 19:11
  3. Current TAB player seems not working here
    By ErosOlmi in forum T.A.B. (ThinBasic Adventure Builder)
    Replies: 10
    Last Post: 21-04-2007, 12:41

Members who have read this thread: 0

There are no members to list at the moment.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •