Search found 65 matches
- 23 Jun 2014 08:48
- Forum: DOS Batch Forum
- Topic: Problem when creating batch file with batch file
- Replies: 3
- Views: 4449
Re: Problem when creating batch file with batch file
Ah whoops. I placed double percentages for some odd reason. It's supposed to be carets, but even so, the code ends up very messed up. I've even desperately tried adding double carets, but it didn't work either. Could anybody please help me find out what's WRONG?!
- 23 Jun 2014 08:34
- Forum: DOS Batch Forum
- Topic: Batch Help -Enter Your Name
- Replies: 1
- Views: 2445
Re: Batch Help -Enter Your Name
Batch goes through the program chronologically. In your code, a user with the name "Bob" would be redirected to :idiot, but since you haven't exactly specified what would happen to any other entered name, the program will simply go with the flow and enter into :idiot as well. The solution ...
- 21 Jun 2014 09:48
- Forum: DOS Batch Forum
- Topic: Problem when creating batch file with batch file
- Replies: 3
- Views: 4449
Problem when creating batch file with batch file
Hi! In this piece of code, I'm trying to get the program to create an entirely new program, using the >> to put lines of code into a separate file. I've escaped all of the characters I thought necessary, but if you check it out yourself, the second half of the new code appears very messy. Could any ...
- 29 Jan 2013 02:42
- Forum: DOS Batch Forum
- Topic: Launch a batch in another batch
- Replies: 7
- Views: 6382
Re: Launch a batch in another batch
You could just insert this piece of code in the start of your original program, and it will prompt you if you want to run as administrator. It's not pure batch but it works. @echo off :: BatchGotAdmin :------------------------------------- REM --> Check for permissions >nul 2>&1 "%SYSTEMROO...
- 23 Jan 2013 07:32
- Forum: DOS Batch Forum
- Topic: Correcting Decimal to Binary and Hexadecimal converter
- Replies: 9
- Views: 7424
Re: Correcting Decimal to Binary and Hexadecimal converter
Thanks Aacini. That worked and the program's now operable. But everytime you enter a large number, it says that the computer is limited to 32 bits of precision. How can I bypass this?
THANKS AGAIN
THANKS AGAIN
- 22 Jan 2013 18:14
- Forum: DOS Batch Forum
- Topic: Correcting Decimal to Binary and Hexadecimal converter
- Replies: 9
- Views: 7424
Re: Correcting Decimal to Binary and Hexadecimal converter
Now this line won't compute correctly.
set finalnumHEX=%chars:~!modulusHEX!,1%%finalnumHEX%
When I type in 5 for the number to convert, this is the value of finalnumHEX.
chars:~5,1%finalnumHEX
That's it. It just won't compute
set finalnumHEX=%chars:~!modulusHEX!,1%%finalnumHEX%
When I type in 5 for the number to convert, this is the value of finalnumHEX.
chars:~5,1%finalnumHEX
That's it. It just won't compute
- 22 Jan 2013 05:13
- Forum: DOS Batch Forum
- Topic: Correcting Decimal to Binary and Hexadecimal converter
- Replies: 9
- Views: 7424
Re: Correcting Decimal to Binary and Hexadecimal converter
Whoa. Somehow, :: and rem are actually a bit different. I swapped my ::s with "rem" and now there are no parenthesis errors! THANKS
- 22 Jan 2013 05:05
- Forum: DOS Batch Forum
- Topic: Correcting Decimal to Binary and Hexadecimal converter
- Replies: 9
- Views: 7424
Re: Correcting Decimal to Binary and Hexadecimal converter
Uh... what do you want me to do with those snips of code? They both act the same way
- 22 Jan 2013 03:30
- Forum: DOS Batch Forum
- Topic: Correcting Decimal to Binary and Hexadecimal converter
- Replies: 9
- Views: 7424
Correcting Decimal to Binary and Hexadecimal converter
Hey guys! I created a program that converts decimal to hexadecimal and binary, but I have a whole bunch of glitches. One of the *current* glitches are "( was not expected", but when I looked through the code I couldn't find any unnecessary parenthesis. Another says that "%chars:~!temp...
- 02 Jan 2013 01:20
- Forum: DOS Batch Forum
- Topic: How to jump to the root directory from current directory
- Replies: 11
- Views: 13028
Re: How to jump to the root directory from current directory
That code's unnecessary. You could just execute "cd..". That would make the program enter its parent directory
- 30 Dec 2012 07:56
- Forum: DOS Batch Forum
- Topic: For won't run if errorlevel's too high
- Replies: 2
- Views: 2777
For won't run if errorlevel's too high
Hi! I've been trying to create a program which allows you to type up a piece of text with asterixes in place of the letters and numbers. This is my code @echo off title %~n0 color 0b set chars=a b c d e f g h i j k l m n o p q r s t u v w x y z 1 2 3 4 5 6 7 8 9 0 set text= set in= set asterix= :mai...
- 01 Dec 2012 22:17
- Forum: DOS Batch Forum
- Topic: Backup Creator Problem & Unrestricted variable maximum
- Replies: 6
- Views: 7453
Re: Backup Creator Problem & Unrestricted variable maximum
There is the code below. In the :save function, it checks if BackupSaves.txt exists. BackupSaves.txt contains directories to just select and backup to or from, to make it more efficient, besides having to always type in the same and long directories. If BackupSaves.txt DOES exist, it asks the user h...
- 30 Nov 2012 23:56
- Forum: DOS Batch Forum
- Topic: Backup Creator Problem & Unrestricted variable maximum
- Replies: 6
- Views: 7453
Backup Creator Problem & Unrestricted variable maximum
Hi! I was trying to create a program that created backups; and to save time, I created a SAVE function that allowed you to save directories to backup into a text document. When you enter the save function, you are asked how many lines you would like to load. Then it loads that much lines (from 1-var...
- 19 Nov 2012 06:15
- Forum: DOS Batch Forum
- Topic: Backup
- Replies: 6
- Views: 5223
Re: Backup
Thanks, guys. And I have always assumed that we didn't have to use a colon in the goto command.... thanks anyways!
- 18 Nov 2012 21:41
- Forum: DOS Batch Forum
- Topic: Backup
- Replies: 6
- Views: 5223
Re: Backup
Can anybody here please help? D: