Go Back   FlashFXP Forums > > > >

! Requests Need a script or some sort of cool .bat file ? Ask here!

Reply
 
Thread Tools Rating: Thread Rating: 10 votes, 5.00 average. Display Modes
Old 11-02-2004, 01:27 PM   #1
BobbyBonilla
Member
 
Join Date: Feb 2003
Posts: 36
Question How to create a custom site command?

Hello,

I would like to implement the following custom site command:

site giveaccess <user>

The command is supposed to execute the following site command:

SITE CHANGE <user> VFSFILE ..\etc\private.vfs

Thanx a lot in advance for your help, Bobby.
BobbyBonilla is offline   Reply With Quote
Old 11-02-2004, 02:27 PM   #2
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

Code:
#include <stdio>

int main (int argc, char **argv)
{
  if ( argc == 2 )
  {
    printf("Changing '%s' VFSFILE to '..\\etc\\private.vfs'\n",argv[1]);
    printf("!change %s vfsfile ..\\etc\\private.vfs\n",argv[1]);
  }
  
  return 0;
}
jeza is offline   Reply With Quote
Old 11-02-2004, 02:31 PM   #3
BobbyBonilla
Member
 
Join Date: Feb 2003
Posts: 36
Default

and where do I add this?
BobbyBonilla is offline   Reply With Quote
Old 11-02-2004, 02:50 PM   #4
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

copy code to file and save as giveaccess.cpp

compile with borland c++ compiler
http://www.borland.com/products/down...cbuilder.html#

Code:
bcc32.exe -w- -O2 -Ipath.to\BCC55\Include -Lpath.to\BCC55\Lib -npath\to\where\u\wanna\this\exe -egiveaccess.exe path\to\giveaccess.cpp
in ioftpd.ini add command
Code:
givaaccess = exec path\to\giveaccess.exe
and
permission
Code:
giveacces = 1
jeza is offline   Reply With Quote
Old 11-02-2004, 02:55 PM   #5
jeza
Senior Member
ioFTPD Scripter
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

download the exe file here

http://www.ioftpd.com/scripts/script.php?id=148
jeza is offline   Reply With Quote
Old 11-02-2004, 04:54 PM   #6
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

You could have just used a simple batch file...

Code:
@ECHO OFF
ECHO Changing '%1' VFSFILE to '..\\etc\\private.vfs'
ECHO !change %1 vfsfile ..\\etc\\private.vfs
EXIT 0
BobbyBonilla, please post in the correct forum category; this is not a question specific to registered ioFTPD versions.
neoxed is offline   Reply With Quote
Old 11-03-2004, 04:49 AM   #7
BobbyBonilla
Member
 
Join Date: Feb 2003
Posts: 36
Default

Sorry NeoXed for posting in the wrong section. Will try to do it right next time :>

Many thanks to both of u for your help.

Bye, Bobby.
BobbyBonilla is offline   Reply With Quote
Old 11-05-2004, 02:30 AM   #8
dink-puller
Member
ioFTPD Foundation User
 
dink-puller's Avatar
 
Join Date: Sep 2004
Posts: 58
Default

Quote:
Originally posted by NeoXed
You could have just used a simple batch file...

Code:
ECHO !change %1 vfsfile ..\\etc\\private.vfs
EXIT 0
Is this how all ioFTPD commands can be executed in a batch file?
And...can the custom commands be added to a batch file too this same way, i.e. ECHO !<command> <params>, or just native ioftpd commands?
dink-puller is offline   Reply With Quote
Old 11-05-2004, 03:18 AM   #9
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

The !change command provides the same functionality for scripts, as the SITE CHANGE <target> <option> <parameters> command does for users.
neoxed is offline   Reply With Quote
Old 06-21-2006, 07:48 AM   #10
dink-puller
Member
ioFTPD Foundation User
 
dink-puller's Avatar
 
Join Date: Sep 2004
Posts: 58
Default

Can any site command custom or otherwise, be used in a batch file this way?
dink-puller is offline   Reply With Quote
Reply

Tags
command, custom, giveaccess, lot, site

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GuildFTPd command set (import) Jesper Custom Commands 4 07-29-2011 12:41 AM


All times are GMT -5. The time now is 11:16 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)