Search found 1966 matches

by penpen
24 Jul 2013 05:05
Forum: DOS Batch Forum
Topic: Study about moving the cursor up
Replies: 18
Views: 20551

Re: Study about moving the cursor up

If MS hasn't changed it, some ANSI.SYS functions may be still disabled using cmd.exe: http://support.microsoft.com/kb/101875/en-us So for full support you have to use command.com. But using it has the advantage that %SystemRoot%\System32\config.nt remains unchanged, if you don't want t change it: Cr...
by penpen
23 Jul 2013 01:54
Forum: DOS Batch Forum
Topic: Script to delete particular folder/file name
Replies: 1
Views: 2570

Re: Script to delete particular folder/file name

Some more informations were not that bad: Is the folder/file on all systems at the same location (always: X:\1\2\3\4.txt), or is the folder/file on all systems in the same path (always \1\2\3\4.txt but on different volumes somewhere in A: to Z:), or is the folder/file on all systems in an own path. ...
by penpen
22 Jul 2013 16:40
Forum: DOS Batch Forum
Topic: Batch Buttons / toggles?
Replies: 3
Views: 4296

Re: Batch Buttons / toggles?

A text menue could be created, receiving inputs from keyboard as done in the controller part of: http://www.dostips.com/forum/viewtopic.php?f=3&t=4741&start=30 @echo off setlocal enableDelayedExpansion set "up=w" set "down=s" set "toggle= " set "quit=q"...
by penpen
22 Jul 2013 10:08
Forum: DOS Batch Forum
Topic: Script changed by input
Replies: 9
Views: 6530

Re: Script changed by input

Ah, i didn't understand to get the input from user, so here is a example doing that, too: @echo off setlocal enableDelayedExpansion set "input=" set /p "input=Please type in a non negative int32 number: " if defined input ( set /a "parsedInput=input" if not "!input...
by penpen
22 Jul 2013 09:08
Forum: DOS Batch Forum
Topic: Back for more....
Replies: 3
Views: 3685

Re: Back for more....

What do you think about C#? Its higher up, plus it seems to be quicker to put together. C# is as good as Java if you don't need a documentation frequently. I think learning Java and C, as two low level languages, wont speed my app creation speed up that much. Don't know why you think C and Java are...
by penpen
22 Jul 2013 07:46
Forum: DOS Batch Forum
Topic: Back for more....
Replies: 3
Views: 3685

Re: Back for more....

C++ with QT result in the fast applications, and if you have programed using these a while, you then should develope apps quickly. But up to that i would then recommend you to use Java. Java has a syntax similar to C++ and you should not have big problems in using it. Additionally the Java documenta...
by penpen
22 Jul 2013 06:31
Forum: DOS Batch Forum
Topic: Script changed by input
Replies: 9
Views: 6530

Re: Script changed by input

Penpen, you don't need to change the delimiter to a space to have the for loop work correctly. It will parse the ID variable just fine with a semicolon or a comma as the delimiter. Cool Hi, It's not working for me Let's me explain more ... This example works, but i assumed you have coded all other,...
by penpen
22 Jul 2013 06:05
Forum: DOS Batch Forum
Topic: Study about moving the cursor up
Replies: 18
Views: 20551

Re: Study about moving the cursor up

Great idea, i've never thought of using C#/batch hybrid script, although i like hybrid scripts. This is more or less a matter of taste, but prefer to avoid creating temp source files via echo. The code then is more readable (in my opinion), and no characters have to be escaped. And i changed the for...
by penpen
22 Jul 2013 02:38
Forum: DOS Batch Forum
Topic: Script changed by input
Replies: 9
Views: 6530

Re: Script changed by input

hi, (...) i have a function that doing things (...) The script will run my function (...) The name of the function were good to know, as it should be called. I assume its name is myFunc. (...) If it set to null (...) I'm setting in the beginning the variable (....) It's good like it's working now. ...
by penpen
22 Jul 2013 01:39
Forum: DOS Batch Forum
Topic: RAID 1.3 via DOS?
Replies: 18
Views: 14403

Re: RAID 1.3 via DOS?

Even in the good case you are reading only 75% using C++ or similar, instead of using pure batch. And the checksum must not be really a part of the file, you may decide to compute the md5 hash and crc32 checksum all 2024 (just an exmple) bytes of file data, and store it somewhere else, so it doesn't...
by penpen
21 Jul 2013 14:42
Forum: DOS Batch Forum
Topic: RAID 1.3 via DOS?
Replies: 18
Views: 14403

Re: RAID 1.3 via DOS?

... but it gets really complicated and just as IO intensive if the entire file is being read. No. If you have file F on 3 drives A,B,C then you have to compare it pairwise using batch, so you load at least this file (from different locations) at 4 times if there is no difference, or up to 6 times i...
by penpen
21 Jul 2013 14:00
Forum: DOS Batch Forum
Topic: password protect
Replies: 5
Views: 5452

Re: password protect

Even in MS_DOS 6.22 days this was not a safe way. If you want to see, what is inside you just have to use dir and xcopy. Lets assume you are in parent directory of the alt-char named folder, TEST is an unused filename, and A is part of this alt-char named folder (verified using dir), then this is a ...
by penpen
21 Jul 2013 12:54
Forum: DOS Batch Forum
Topic: RAID 1.3 via DOS?
Replies: 18
Views: 14403

Re: RAID 1.3 via DOS?

It is not recommended to do that using batch... . If you want a fast and secure way to do this i recommend you to learn c++ or something similar and some little bit about CRC32 and MD5. If you do that you are able to detect even small parts of files that had been corrupted. Also you need to read muc...
by penpen
21 Jul 2013 12:31
Forum: DOS Batch Forum
Topic: Study about moving the cursor up
Replies: 18
Views: 20551

Re: Study about moving the cursor up

I fear it is not possible to send special keys via pipe using the cmd shell, or command.com environment. If nothing important was changed since MS-DOS 6.22, piped bytes with value 0x00 will be interpreted by set /p as an end of line. I assume nothing changed, because <nul set /p "=." still...
by penpen
20 Jul 2013 16:48
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file
Replies: 13
Views: 12657

Re: batch file to search and copy particular file

I had built in some errors, sry. :oops:
I have corrected the code above, hopefully it works now.

penpen