Difference between revisions of "File Commands"

From ASSS Wiki
Jump to: navigation, search
(Added category)
(added ?putmap ?renfile and ?delfile)
Line 29: Line 29:
 
=== ?putzip <somefile.zip>[:<destination path>] ===
 
=== ?putzip <somefile.zip>[:<destination path>] ===
 
This is similar to ?putfile. The optional part after colon is used to specify a target directory rather than a file. The zip file will be uncompressed into this directory or the current working directory (see ?pwd). Any directory tree structure in the zip file is ignored and files from the .zip will overwrite any duplicate files. Note: this command is not available to windows users.
 
This is similar to ?putfile. The optional part after colon is used to specify a target directory rather than a file. The zip file will be uncompressed into this directory or the current working directory (see ?pwd). Any directory tree structure in the zip file is ignored and files from the .zip will overwrite any duplicate files. Note: this command is not available to windows users.
 +
 +
=== ?putmap <somemap.lvl> ===
 +
This will upload ''somemap.lvl'' to maps/uploads/arenaname.lvl where arenaname is the arena you are currently in. It appends a setting to arena.conf to use this map. You will need to reload the arena for the changes to take effect, you can use the ?recyclearena command to do this.
  
 
== Helper commands ==
 
== Helper commands ==
Line 47: Line 50:
 
Current working directory: .
 
Current working directory: .
 
</pre>
 
</pre>
 +
 +
=== ?renfile <filename>:<new filename> ===
 +
This command will rename a file. The path is relative to the current directory. '''someone confirm if this overwrites ''new filename'' if it already exists'''
 +
 +
=== ?delfile <filename> ===
 +
This will delete a file, so use caution with this. Again the path is relative to the current working directory.
  
 
[[Category: Server]]
 
[[Category: Server]]
 
[[Category: Tutorial]]
 
[[Category: Tutorial]]

Revision as of 10:04, 11 January 2005

Uploading and downloading files within the game

?getfile <path>

This will retrieve a file from the server and download it into your client directory. Useful paths to know are maps and arenas where maps and arenas are located respectively.

?getfile arenas/(default)/arena.conf
File received: arena.conf

?putfile <local path>[:<destination path>]

Don't be put off by the complexity of this command. It can be used like a normal *putfile:

?putfile news.txt
Sending file: news.txt
File received: ./news.txt

You can supply an optional destination path by using a colon:

?putfile local.lvl:maps/local.lvl
Sending file: local.lvl
File received: ./maps/local.lvl

The path is relative to the base directory where asss has been installed. You can also change the filename using the colon method.

?putfile arena.conf.bak:arenas/(public)/arena.conf
Sending file: arena.conf.bak
File received: ./arenas/(public)/arena.conf

?putzip <somefile.zip>[:<destination path>]

This is similar to ?putfile. The optional part after colon is used to specify a target directory rather than a file. The zip file will be uncompressed into this directory or the current working directory (see ?pwd). Any directory tree structure in the zip file is ignored and files from the .zip will overwrite any duplicate files. Note: this command is not available to windows users.

?putmap <somemap.lvl>

This will upload somemap.lvl to maps/uploads/arenaname.lvl where arenaname is the arena you are currently in. It appends a setting to arena.conf to use this map. You will need to reload the arena for the changes to take effect, you can use the ?recyclearena command to do this.

Helper commands

There are two helper commands that can be used with these three, ?cd and ?pwd.

?cd <path>

With this command you can change the current directory. By default it will start off as ., the base directory for the asss install.

?cd arenas/(public)
Changed working directory.

You shouldn't use .. or end the path with /. This command is different from the cd command that you would find in a shell in that the parameter is always taken to be relative to the asss base directory.

?pwd

The print working directory command shows where you are currently located.

?pwd
Current working directory: .

?renfile <filename>:<new filename>

This command will rename a file. The path is relative to the current directory. someone confirm if this overwrites new filename if it already exists

?delfile <filename>

This will delete a file, so use caution with this. Again the path is relative to the current working directory.