You are here

Batch files.

8 posts / 0 new
Last post
King Tut
Offline
Last seen: 13 years 1 week ago
Joined: 2006-06-15 05:47
Batch files.

I'm making a batch file launch script thingy, and I was looking at licenses. Can I, (or should I) put a license on it? It would obviously be open source...
But then I thought that I might not even be able to put a license on a batch script.

So what do you guys think I should do? This is really just a step towards my eventual leap into programming, and I'd like to keep my work as my own, not as someone else posting it as their own and saying they made it. Sad

John Bentley
John Bentley's picture
Offline
Last seen: 15 years 3 months ago
Developer
Joined: 2006-01-24 13:26
You can, and probably

You can, and probably should. Personally I use the MIT License, but that means anyone can use your program for anything. (eg. Modify + sell.)

cowsay Moo
cowthink 'Dude, why are you staring at me.'

shookmon
Offline
Last seen: 7 years 5 months ago
Joined: 2007-02-21 16:26
Well, quite frankly, you

Well, quite frankly, you could, but for a script, it's probably not worth it. Batch files have been around so long, and there is so much information on the net about how to write them, there's probably no way you could prove that someone actually stole your code or developed it themselves.

You'll find that when you get to writing code for a client that it usually depends on or involves something incredibly specific or business-centric that the code wouldn't work for any other client. Here too, if a code thief stole it, what could they do with it? I've written many a program thinking that "wow, if I could sell this..." but then it ends up being pointed out that the software only has significance to the company I wrote it for. Which is why they hired me to write it. That is, they couldn't buy it off the shelf.

I think that unless the work represents a significant amount of effort for a professional (just because it took you two weeks to learn and write, probably only means that a pro could've whipped it off in a few minutes), performs some amazingly brilliant never thought of before function, or you are planning to charge for it, let it go. Especially if you're going to wide-open source it anyways. That's essentially what you accomplish by not licensing it. The license just ends up being one more thing to keep up with. A license won't stop a code thief anyways, so really why bother?
_________________________________________________
There. I have a signature. I hope you're happy now.

Michael D. Shook

5of0
Offline
Last seen: 16 years 5 months ago
Joined: 2006-09-08 12:31
PABatch - my solution for a command-line launcher

Not to steal your thunder, but I already made them, and saw no need to start a new topic so here goes.
I made a batch file to make things nice and easy. I made a little how-to/download/why I made it page, but it's just unzipping to the base folder and then you can do something like:
Start->Run->F:\pa\ff
To launch Portable Firefox, for instance. Dead simple, you can make launchers for any of your apps with barely any effort. Check out the about page for how I set it up to keep the commands short.
About page: http://fiveofoh.llynix.com/pabatch
Direct Download: http://fiveofoh.llynix.com/pabatch/pa.zip
By the way, I'm throwing it out into the public domain, so have at it Wink
---
I've got Portable...
Firefox, Gaim, GIMP, AbiWord, VLC, 7zip, OpenOffice, FileZilla, KompoZer.
Also: WinFrotz, FCEUltra, DOSBox, FSCapture, XVI32, Notepad++

---
I've got Portable...
Firefox, Gaim, GIMP, AbiWord, VLC, 7zip, OpenOffice, FileZilla, KompoZer.
Also: WinFrotz, FCEUltra, DOSBox, FSCapture, XVI32, Notepad++

wraithdu
Offline
Last seen: 11 years 6 months ago
Developer
Joined: 2007-06-27 20:22
Nice simple bat files. 2

Nice simple bat files. 2 bugs though (I know, I'm a ballbuster).

1. Your page refers to pa.bat, I think it should be ra.bat based on your zip file. Or you misnamed the bat file in the zip, either way one needs to be changed.

2. Line 6 should be 'GOTO SKIPADDCD' I think.

Tips for your script -

1. bat scripts usually start off with

@echo off
cls
setlocal (optional)

Not supremely necessary, but good practice.

2. you can use 'IF /I' to do a case insensitive comparison. Also it's probably better to use [] instead of "" to avoid eventual problems, ie

IF /I [%2]==[p]

3. consider using

start "" /b "%1.exe"

to launch your program. Simply running the command will, in some cases, make your bat file sit there waiting for the external program to end. Try notepad.exe as an example.

5of0
Offline
Last seen: 16 years 5 months ago
Joined: 2006-09-08 12:31
Sweet, thanks!

I've updated the batch file and site accordingly, thanks for the tips. Keeping my Portable Filezilla busy Wink
---
I've got Portable...
Firefox, Gaim, GIMP, AbiWord, VLC, 7zip, OpenOffice, FileZilla, KompoZer.
Also: WinFrotz, FCEUltra, DOSBox, FSCapture, XVI32, Notepad++

---
I've got Portable...
Firefox, Gaim, GIMP, AbiWord, VLC, 7zip, OpenOffice, FileZilla, KompoZer.
Also: WinFrotz, FCEUltra, DOSBox, FSCapture, XVI32, Notepad++

King Tut
Offline
Last seen: 13 years 1 week ago
Joined: 2006-06-15 05:47
No, my batch file is more of

No, my batch file is more of a little thing that runs (in my case) ASuite, and some other applications that I want to autorun, but asks if I want to run all of them, or just one or whatever. There's also a few other things in there.

5of0
Offline
Last seen: 16 years 5 months ago
Joined: 2006-09-08 12:31
Ah, good

Okay, good. I wrote a very simple one of those, without asking or anything - just to launch my three favorite apps Blum
Hmm, should I stop hijacking this thread and start one of my own?
---
I've got Portable...
Firefox, Gaim, GIMP, AbiWord, VLC, 7zip, OpenOffice, FileZilla, KompoZer.
Also: WinFrotz, FCEUltra, DOSBox, FSCapture, XVI32, Notepad++

---
I've got Portable...
Firefox, Gaim, GIMP, AbiWord, VLC, 7zip, OpenOffice, FileZilla, KompoZer.
Also: WinFrotz, FCEUltra, DOSBox, FSCapture, XVI32, Notepad++

Log in or register to post comments