Search found 14 matches

by Osmium Programming
02 Jul 2018 18:07
Forum: DOS Batch Forum
Topic: Double expansion ? Trouble expanding a variable inside another variable and displaying it
Replies: 5
Views: 5519

Re: Double expansion ? Trouble expanding a variable inside another variable and displaying it

That's not what I was looking for, but thanks anyway aGerman, it's nice to know there is always a person to ask. I appreciate it!
Also, thanks Grapefruits, that really helps!
by Osmium Programming
27 Jun 2018 18:07
Forum: DOS Batch Forum
Topic: Double expansion ? Trouble expanding a variable inside another variable and displaying it
Replies: 5
Views: 5519

Double expansion ? Trouble expanding a variable inside another variable and displaying it

I was working on a command prompt in batch, and for the command that displays text on the screen, when I tried to display a variable it displayed it like this- %variable% The relevant code for that is set var=4 set /p a= echo %a% If I enter %var% it displays %var%, not its contents (4). However, whe...
by Osmium Programming
16 May 2018 19:24
Forum: DOS Batch Forum
Topic: Reading a website and saving as variable
Replies: 2
Views: 3353

Re: Reading a website and saving as variable

Yes!! This is super cool! Thanks so much, this really helps.
by Osmium Programming
16 Apr 2018 21:32
Forum: DOS Batch Forum
Topic: Reading a website and saving as variable
Replies: 2
Views: 3353

Reading a website and saving as variable

I want to create an update checker that checks a raw pastebin file that I will make that contains the current version of the program. If it matches the installed program's version, great. If not, it will read the same pastebin for the link to the current version and update it. The only thing that co...
by Osmium Programming
16 Feb 2018 19:21
Forum: DOS Batch Forum
Topic: How to replace space in file names
Replies: 3
Views: 4497

Re: How to replace space in file names

A way to replace those characters in variables is like so:

Code: Select all

set a=%a: =_%
From there you could have a for command rename all those files.
by Osmium Programming
30 Jan 2018 21:31
Forum: DOS Batch Forum
Topic: Osmium BASIC - Commodore 64 spoof
Replies: 1
Views: 2558

Re: Osmium BASIC - Commodore 64 spoof

To install it properly, run the command SETUP once inside the program, then move Osmium BASIC into the newly created folder.
by Osmium Programming
30 Jan 2018 21:30
Forum: DOS Batch Forum
Topic: Osmium BASIC - Commodore 64 spoof
Replies: 1
Views: 2558

Osmium BASIC - Commodore 64 spoof

I've been working on this one for a bit, and at v1.8, I'm deciding to post it to dostips, even though it's already up on osmiumsoft.wordpress.com/programs/basic Any feedback would be much appreciated! Source code: ::osmiumsoft.wordpress.com ::Do not claim this program as your own. If you have a revi...
by Osmium Programming
30 Jan 2018 21:24
Forum: DOS Batch Forum
Topic: Osmium 64 - Batch OS
Replies: 1
Views: 4148

Osmium 64 - Batch OS

Even though all my programming projects can be found at osmiumsoft.wordpress.com, it's nice to post to a community. I have been working on this batch os for a long time, and I can now say that I'm happy enough with it that I can post it to a major community. Here is the source code, which can also b...
by Osmium Programming
29 Jan 2018 18:55
Forum: DOS Batch Forum
Topic: Save and load in batch RPG
Replies: 8
Views: 7970

Re: Save and load in batch RPG

Oh I just realized that the > thingy was the other way around.... :P
by Osmium Programming
24 Jan 2018 16:45
Forum: DOS Batch Forum
Topic: Save and load in batch RPG
Replies: 8
Views: 7970

Re: Save and load in batch RPG

Wow, I completely blanked over that... I must have been way too tired to think
by Osmium Programming
24 Jan 2018 16:42
Forum: DOS Batch Forum
Topic: FOR command delims help
Replies: 2
Views: 3208

Re: FOR command delims help

Thanks so much! I thought of another solution though.

Code: Select all

set input=%input:"=@%
for /f "delims=@" %%a in () do ()
set input=%input:@="%
But that was before I saw your reply, and now I'll use yours because it's a lot simpler.

-Osmium Programming
by Osmium Programming
23 Jan 2018 01:01
Forum: DOS Batch Forum
Topic: FOR command delims help
Replies: 2
Views: 3208

FOR command delims help

I am trying to set a delimiter to "
I am failing
help

Here's what the guts of it looked like:

Code: Select all

for /f "delims="" %%a in () do ()
I tried to fix it:

Code: Select all

for /f "delims=^"" %%a in () do ()
Same thing

I am positive that the error is my lack in ability to set a delim to "
How do I do this?
by Osmium Programming
23 Jan 2018 00:53
Forum: DOS Batch Forum
Topic: Save and load in batch RPG
Replies: 8
Views: 7970

Re: Save and load in batch RPG

Here's how I would load in your circumstance:

< filename.ext (
set /p var1 <--- Puts line 1 into a variable
set /p var2 <--- Puts line 2 into a variable, etc.
etc..
)
by Osmium Programming
23 Jan 2018 00:48
Forum: DOS Batch Forum
Topic: Removing spaces from a variable in batch
Replies: 1
Views: 16337

Re: Removing spaces from a variable in batch

In the set /? help thing, it says that you can replace strings and characters in a variable with a custom string or character. To remove the spaces from "hi there" in the variable a, run set a=%a: =%

To replace a's with b's, run set a=%a:a=b%

You get the point

It is case insensitive