Is there anyway to run a .bat command on chromebook?

-3

This is the command I want to run (excluding the real urls and names):

@echo off

start "name" "url"

start "name" " url"

start "name" "url"

start "name" "url"

start "name" "url"

start "name" "url"

perfectstorm

Posted 2016-12-07T05:37:02.457

Reputation: 1

Answers

2

Batch files are not supported on Chromebook because they are specific to the Windows operating system. If you do not have Windows on your Chromebook (which you probably don't), this will not work.

You can create a script with similar functionality in bash:

#!/bin/bash

# Similar to @echo off
exec 1>/dev/null
exec 2>/dev/null

# Similar to start
/path/to/browser 'url1'
/path/to/browser 'url2'

mtak

Posted 2016-12-07T05:37:02.457

Reputation: 11 805

Does ChromeOS have the xdg-open command (which is the closest equivalent of the Windows start command)? If yes, it's better to use xdg-open url. – cylgalad – 2016-12-07T09:33:13.257

I don't think ChromeOS has xdg-utils built in. You could always install it, but for this I think it's a bit overkill. If your system does include xdg-open then it would be best to use that. – mtak – 2016-12-07T10:23:46.147

So if i find the browsers path it would go like this

#! /bin/bash

exec 1>/dev/null exec2>/dev/null

/find/find/find 'url+1' /find/find/find 'url+2'

and save it as.... ? – perfectstorm – 2016-12-08T01:31:58.507

Use !#/bin/bash, without the space. Doesn't matter what you save the file as, although conventionally you would use the .sh suffix. Also remember to make the file executable with chmod +x file.sh – mtak – 2016-12-08T10:10:37.383