Community discussions

 
wesgarland
just joined
Topic Author
Posts: 1
Joined: Fri Jul 22, 2011 11:43 pm

How to upload scripts?

Fri Jul 22, 2011 11:49 pm

How can I upload CMD scripts, rather than typing them in through the console?

I'm using RB450 and RB450Gs if that matters.

Thanks,
Wes
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1681
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: How to upload scripts?

Mon Jul 25, 2011 1:37 pm

put the code in a *.rsc file.

then upload it to the router and type in terminal: import myfile.rsc


or create it in /system scripts
Martín
martinruiz at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Certified in Traffic Shaping, Wireless, Internetworking, Routing and User Management.
MTCTCE - MTCWE - MTCINE - MTCUME - MTCRE
 
CyberT
Member Candidate
Member Candidate
Posts: 172
Joined: Tue Feb 01, 2011 1:39 pm
Location: Johannesburg, South Africa
Contact:

Re: How to upload scripts?

Mon Jul 25, 2011 2:45 pm

yes you can use a recombination of the HTTP get import and if really required ssh environments.

You can use SSH to send an terminal command to the Routerboard without having to log into the routerboard each time

I use Putty to achieve this and by creating a command line for putty to pass to the Routerboard in the command file you can do an file that grabs an .rcs file of an HTTP

You can then in one of 2 ways import it
1 By having a second command that you send via ssh to run the downloaded rcs
2 By having a script check every 5 mins for update.rcs and if found then running that.

Depepnds on your requirements then i can assist you with how you can do all of these things, i spend a while on google to figure all these out.
If this helped you then please slam that Karma button :-)
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1681
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: How to upload scripts?

Mon Jul 25, 2011 3:05 pm

Uploading via FTP a file called <something>.auto.rsc it will autoexecute itself before upload is completed.
Martín
martinruiz at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Certified in Traffic Shaping, Wireless, Internetworking, Routing and User Management.
MTCTCE - MTCWE - MTCINE - MTCUME - MTCRE
 
mars
Member Candidate
Member Candidate
Posts: 228
Joined: Sun Mar 14, 2010 1:43 pm

Re: How to upload scripts?

Mon Apr 09, 2012 11:11 am

Uploading via FTP a file called <something>.auto.rsc it will autoexecute itself before upload is completed.
hi
we tested the .auto.rsc file and it does not run automatically on the rb
can you give a example of a script that will be fetched from the ftp and run auto on the rb and then be deleted
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6283
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: How to upload scripts?

Wed Apr 11, 2012 10:52 am

not fetched, but uploaded via FTP
 
kodiak
just joined
Posts: 24
Joined: Sat Jan 11, 2014 5:39 am
Location: Pittsburgh, PA (USA)

Re: How to upload scripts?

Wed Jan 15, 2014 2:46 am

not fetched, but uploaded via FTP
Hey guys. Sorry to necro but I figured I'd rather bump a thread that start a whole new one.

Anyhow I'm a fairly new RouterOS user, running 6.7 on a CRS125, and from this thread I really can't tell how the heck to upload a script I've been working on. My CRS125 doesn't seem to have FTP working. I see in IP -> services that FTP is enabled, but I can't browse to ftp://<my_router>.

Furthermore I don't see how I could create dirs to upload into via ftp and don't see any folders other than "skins" in the stores area.

Thanks!
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1681
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: How to upload scripts?

Wed Jan 15, 2014 9:28 am

Hello,


you can enter with winbox and drag & drop files or any directory that you want to upload to /FILES.


If ip/services shows you that FTP is open, perhaps you have a firewall rule in ip/firewall.

Try to enter with winscp using SSH port. The use it's same as FTP but using port of ssh.
Martín
martinruiz at ibersystems.es
Experto en redes WiFi y enlaces WiFi.

Facebook: @Ibersystems
Twitter: @Ibersystems

Certified in Traffic Shaping, Wireless, Internetworking, Routing and User Management.
MTCTCE - MTCWE - MTCINE - MTCUME - MTCRE

Who is online

Users browsing this forum: No registered users and 9 guests