DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Variable working directory  (Read 8,530 times)

Boris99

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
Variable working directory
« on: December 13, 2008, 05:58 PM »
Hi, these are my first steps with LBC.
What I try is to hold the working directory variable. I have many scripts which works with directories, from they the script are started.
Works also fine with LBC if I set it as working directory.

My problem is that the working directory still change, so I'm looking for a possibility to hold the working directory variable.
So my 1st idea was to use an environment variable in the working directory field, but it doesn't work. If I set %windier% by the command LBC ignore it and change to program directory.

Any idea how to realize this?

PS.
It's possible to use envy. variables as parameter (using Arguments function), but I don't want to change all my scripts.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Variable working directory
« Reply #1 on: December 13, 2008, 06:33 PM »
there is a Working Directory option for file items:
Screenshot - 12_13_2008 , 12_31_11 PM.png

is that what you were thinking of? or maybe you are wanting to set the working directory when launching a script that you are launching while browsing a virtual folder?

Boris99

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
Re: Variable working directory
« Reply #2 on: December 13, 2008, 07:34 PM »
1st thanks for your fast reply!

What I'm thinking of is to put an environment variable in this field like %WINDIR% or %MyStartingFolder%.
If I do it now the variable seems not be expanded, so my script starts still in LBC program directory.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Variable working directory
« Reply #3 on: December 13, 2008, 09:23 PM »
ah i see.. i can make that field expand environment variables.

Boris99

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
Re: Variable working directory
« Reply #4 on: December 13, 2008, 09:35 PM »
Cool! It would be nice if you could implement it in the next release.
I can't test the tool without this feature at the moment.

Thanks a lot!

Have a nice weekend!

Original address: https://www.donationcoder.com/forum/index.php?topic=16160.0