![]() |
|
Release: CMD Tool - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Coding (https://sinister.ly/Forum-Coding--71) +--- Thread: Release: CMD Tool (/Thread-Release-CMD-Tool) Pages:
1
2
|
Release: CMD Tool - SyntaX - 03-26-2013 Hello HC.. Since im new on this forum i'd like to share some bat codes with you! Allright so.. This is a HUGE CMD Tool, i've made back in 09 Spoiler:Please come with feedback ![]() Best regards Release: CMD Tool - SyntaX - 03-26-2013 Hello HC.. Since im new on this forum i'd like to share some bat codes with you! Allright so.. This is a HUGE CMD Tool, i've made back in 09 Spoiler:Please come with feedback ![]() Best regards RE: Release: CMD Tool - Pyramist - 03-28-2013 Pretty in-depth Batch file. Props man. This is kinda similar to a project I'm working on. It's a great way to learn Batch. I haven't read the entire source yet but one thing I can comment on is every time you set a variable (using set /p=), for the conditional statement (if %variable%==), you don't have to include four different "IF" statements for each possible string. If you use the /i switch, it will do a case-insensitive comparison instead, so it will execute the command regardless of capital/lower-case letters in the string. This should allow you to shave off a hundred lines of code or so. Example: Code: if "%begin3%"=="Y" goto begin
if "%begin3%"=="y" goto begin
if "%begin3%"=="yes" goto begin
if "%begin3%"=="Yes" goto begin
if "%begin3%"=="N" goto exit4
if "%begin3%"=="n" goto exit4
if "%begin3%"=="no" goto exit4
if "%begin3%"=="No" goto exit4Can become: Code: if /i "%begin3%"=="y" goto begin
if /i "%begin3%"=="yes" goto begin
if /i "%begin3%"=="n" goto exit4
if /i "%begin3%"=="no" goto exit4RE: Release: CMD Tool - ArkPhaze - 03-30-2013 There's lots of ways this can be dramatically shortened, I will say that right now. I'm not going to spend the time to do it though as this is more like a bunch of scripts just all combined into one, with tons of menus. I would imagine taking action for some of these things would be faster to do it manually than to go through running this script for that simple reason. RE: Release: CMD Tool - ArkPhaze - 03-30-2013 There's lots of ways this can be dramatically shortened, I will say that right now. I'm not going to spend the time to do it though as this is more like a bunch of scripts just all combined into one, with tons of menus. I would imagine taking action for some of these things would be faster to do it manually than to go through running this script for that simple reason. RE: Release: CMD Tool - SyntaX - 04-02-2013 I know it could be shortened, but i made it years ago
RE: Release: CMD Tool - ArkPhaze - 04-02-2013 (04-02-2013, 11:36 AM)SyntaX Wrote: I know it could be shortened, but i made it years ago And you are then sharing with us an old code of yours that you never improved since (or)? Since 2009 you have never made any other scripts? :whistle: I don't understand. My point being, you posted it here, so you must be proud of it? Unless you are treating this place like your litter box for old and could-be-improved-on batch scripts? You had some ~4 years to improve it a bit, but you claim to know that it can be improved, yet the excuse is that it was an old script you made 4 years ago? Just saying.
RE: Release: CMD Tool - SyntaX - 04-04-2013 Well, it might help other people if they would like to make a CMD tools, they could customize it etc. And im not coding in Batch anymore, only VB so why improve it?
RE: Release: CMD Tool - ArkPhaze - 04-05-2013 (04-04-2013, 04:44 PM)SyntaX Wrote: Well, it might help other people if they would like to make a CMD tools, they could customize it etc. There's half a point you have there... 1. I would partially agree, if this was a personal thing 2. You did release it, and in my opinion why release something that is buggy unless it is a work in progress or you can't write it "better"? That's just my perception though. RE: Release: CMD Tool - ArkPhaze - 04-05-2013 (04-04-2013, 04:44 PM)SyntaX Wrote: Well, it might help other people if they would like to make a CMD tools, they could customize it etc. There's half a point you have there... 1. I would partially agree, if this was a personal thing 2. You did release it, and in my opinion why release something that is buggy unless it is a work in progress or you can't write it "better"? That's just my perception though. |