View unanswered posts | View active topics It is currently Tue Apr 21, 2026 7:48 pm



Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
 write file to new directory 
Author Message
Lieutenant

Joined: Sat Nov 06, 2004 3:00 am
Posts: 600
Location: USA
Unread post write file to new directory
working on my sys op script some more... trying to make the output better looking,
But do to all the files already wrote into the twx directory,
Is there a way to write it to a new folder inside the TWX directory?

_________________
Its not the Kill, Its the Thrill of the Chase
S: Min: 297 Max: 437 Average: 410 -- Just here to attack aliens
S: High/Low Removed   Average: 421
          


Thu Jan 17, 2008 3:46 pm
Profile ICQ WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: write file to new directory
Specify a path... write to "c:\blah\whatever.txt" and that's where it'll go.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Thu Jan 17, 2008 5:02 pm
Profile ICQ WWW
Lieutenant

Joined: Sat Nov 06, 2004 3:00 am
Posts: 600
Location: USA
Unread post Re: write file to new directory
well was trying to do a new path within the twx directory.. which varies player to player...
makes it a easier to find...

_________________
Its not the Kill, Its the Thrill of the Chase
S: Min: 297 Max: 437 Average: 410 -- Just here to attack aliens
S: High/Low Removed   Average: 421
          


Thu Jan 17, 2008 5:50 pm
Profile ICQ WWW
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post Re: write file to new directory
Zarkahn wrote:
well was trying to do a new path within the twx directory.. which varies player to player...
makes it a easier to find...


write to ...\data\newdata\newdata.txt as a relative dir but folder must be there already.

_________________
Coconut Telegraph (ICQ)#586137616
Team Speak3@ 220.244.125.70:9987
Founding Member -=[Team Kraaken]=- Winner of Gridwars 2010 - Ka Pla
Image
Jesus wounldn't Subspace Crawl


Thu Jan 17, 2008 7:06 pm
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: write file to new directory
3 dots? lol...

.\whatever\file.txt

. is current directory, .. is previous directory. It's all just DOS stuff.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Thu Jan 17, 2008 7:39 pm
Profile ICQ WWW
Ambassador
User avatar

Joined: Mon Feb 09, 2004 3:00 am
Posts: 3141
Location: Kansas
Unread post Re: write file to new directory
In the gamestats script that I wrote I have the sysOp include the following in config.txt:

server name
path (where path can be wherever they want the file to end up. )

I should prob rename config.txt to GameStatsConfig.txt so I don't get clashes with someone's config.txt file.

_________________
               / Promethius / Enigma / Wolfen /

"A man who has no skills can be taught, a man who has no honor has nothing."


Thu Jan 17, 2008 8:25 pm
Profile ICQ
Chief Warrant Officer
User avatar

Joined: Wed Jan 04, 2006 3:00 am
Posts: 136
Location: USA
Unread post Re: write file to new directory
Being able to create a new directory would be very nice. Could have a bunch of different uses, like creating auto-installation for scripts or script packs maybe..

Who knows.

MD


Thu Jan 17, 2008 8:28 pm
Profile
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post Re: write file to new directory
Singularity wrote:
3 dots? lol...

.\whatever\file.txt

. is current directory, .. is previous directory. It's all just DOS stuff.



actually it wont work that way.....syntax varies.....if anyone needs it hit me up on icq.

_________________
Coconut Telegraph (ICQ)#586137616
Team Speak3@ 220.244.125.70:9987
Founding Member -=[Team Kraaken]=- Winner of Gridwars 2010 - Ka Pla
Image
Jesus wounldn't Subspace Crawl


Fri Jan 18, 2008 1:31 am
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: write file to new directory
Hmm, really now... ok.

Here's code I just tested:
Code:
setVar $this_dir_file ".\this_dir.txt"
setVar $prev_dir_file "..\prev_dir.txt"
delete $this_dir_file
delete $prev_dir_file

write $this_dir_file "This dir"
write $prev_dir_file "Prev dir"


this_dir.txt was written to twxproxy's dir, and prev_dir.txt was written to my "tradewars" directory directly above it.

Seems to work just fine here. Naturally if the script directory has been changed you'd need to find the new one, or if there are other absolute directories you'd need to work on them specifically. But for simple relative paths this seems to work fine.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Fri Jan 18, 2008 1:39 am
Profile ICQ WWW
Lieutenant

Joined: Sat Nov 06, 2004 3:00 am
Posts: 600
Location: USA
Unread post Re: write file to new directory
thaks guys
the ./worked fine
the directory having to exist sucks though.
If its basically old DOS, isn't there a way to get TWX to MAKEDIR ?

_________________
Its not the Kill, Its the Thrill of the Chase
S: Min: 297 Max: 437 Average: 410 -- Just here to attack aliens
S: High/Low Removed   Average: 421
          


Fri Jan 18, 2008 8:34 am
Profile ICQ WWW
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: write file to new directory
Well, DOS paths. I don't know of a way to get it to do makedir, but direxists and makedir commands would be quite sweet.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Fri Jan 18, 2008 5:36 pm
Profile ICQ WWW
Lance Corporal

Joined: Wed Jan 09, 2008 12:47 pm
Posts: 4
Unread post Re: write file to new directory
umm the old commands are mkdir and md not sure if you tried them
if so sorry to jump in

wilber


Fri Jan 18, 2008 7:10 pm
Profile ICQ
Commander
User avatar

Joined: Wed May 03, 2006 2:00 am
Posts: 1722
Location: USA
Unread post Re: write file to new directory
Zarkahn wrote:
thaks guys
the ./worked fine
the directory having to exist sucks though.
If its basically old DOS, isn't there a way to get TWX to MAKEDIR ?


No....the Unix syntax workes also...

_________________
Coconut Telegraph (ICQ)#586137616
Team Speak3@ 220.244.125.70:9987
Founding Member -=[Team Kraaken]=- Winner of Gridwars 2010 - Ka Pla
Image
Jesus wounldn't Subspace Crawl


Fri Jan 18, 2008 9:01 pm
Profile ICQ YIM
Veteran Op
User avatar

Joined: Thu Jun 02, 2005 2:00 am
Posts: 5558
Location: USA
Unread post Re: write file to new directory
When I said it was "like DOS" I meant the path statements are like DOS, not TWXproxy. TWXproxy isn't like DOS at all, it does not have a makedir, mkdir or md command anywhere in the help file... and I doubt anywhere at all.

_________________
May the unholy fires of corbomite ignite deep within the depths of your soul...

1. TWGS server @ twgs.navhaz.com
2. The NavHaz Junction - Tradewars 2002 Scripts, Resources and Downloads
3. Open IRC chat @ irc.freenode.net:6667 #twchan
4. Parrothead wrote: Jesus wouldn't Subspace Crawl.

*** SG memorial donations via paypal to: dpocky68@booinc.com
Image


Fri Jan 18, 2008 9:20 pm
Profile ICQ WWW
Commander
User avatar

Joined: Tue Oct 07, 2003 2:00 am
Posts: 1134
Location: Augusta, GA
Unread post Re: write file to new directory
TWX has no provision for creating directories. It's probably a bad idea in the long term to add directory creation and deletion options, and I think that file navigation to parent directories should probably be limited to the TWX root directory. I shudder to think of the havok that a malformed script could wreak with those capabilities.

+EP+

_________________
Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.


Sat Jan 19, 2008 1:00 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.