Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: small batch program's I find and make enjoy from DeltaSpider  (Read 22678 times)

0 Members and 1 Guest are viewing this topic.

DeltaSpider

    Topic Starter


    Greenhorn

  • When you stop tring you start dieing,DeltaSpider
  • Thanked: 1
    small batch program's I find and make enjoy from DeltaSpider
    « on: April 01, 2007, 11:10:42 PM »
    here are some cool little thing's for you to checkout if you like batch programming it took me a while to find some of the answer's but it's alway's
    worth it to pass on to other's........

    thank's to computerhope.com for some of the answer's to stuff I have searched out over the year's before I joined up here to post in their forum's
    to get more answer's from some really helpful and talented people...

    thank's everyone your alway's helpful keep the info rollin in I like it!!!!

    [old attachment deleted by admin]

    DeltaSpider

      Topic Starter


      Greenhorn

    • When you stop tring you start dieing,DeltaSpider
    • Thanked: 1
      Re: small batch program's I find and make enjoy from DeltaSpider
      « Reply #1 on: April 01, 2007, 11:22:08 PM »
      sorry forgot to zipit up to give it away all together.....what I WANT TO GIVE
      RIGHT NOW ............you will need a unzip program to open this up ,I used
      winRAR 3.62 I think I have to many computer's and to much stuff to keep
      track of so bare with me ok ,I forget thing's at time's.........everyone does!

      so here it is let's try again.........

      [old attachment deleted by admin]

      Dilbert

      • Moderator


      • Egghead

      • Welcome to ComputerHope!
      • Thanked: 44
        Re: small batch program's I find and make enjoy from DeltaSpider
        « Reply #2 on: April 01, 2007, 11:32:40 PM »
        IŽm in Linux at the moment and canŽt run it. However, I looked at the code and it looks fairly useful -- it basically opens multiple Windows utilities. Great for if you use regedit and similar advanced Windows functions. Good job on this, good luck with your next project.

        Want something ambitious? How about this: Create a menu allowing users to pick any of those utilities from that menu. YouŽll need to know SET /P to do that. :)
        "The geek shall inherit the Earth."

        DeltaSpider

          Topic Starter


          Greenhorn

        • When you stop tring you start dieing,DeltaSpider
        • Thanked: 1
          Re: small batch program's I find and make enjoy from DeltaSpider
          « Reply #3 on: April 01, 2007, 11:54:00 PM »
          here are some tips and knowledge by George Campbell
          I found them to be very useful thing's to know check them out!

          [old attachment deleted by admin]

          DeltaSpider

            Topic Starter


            Greenhorn

          • When you stop tring you start dieing,DeltaSpider
          • Thanked: 1
            Re: small batch program's I find and make enjoy from DeltaSpider
            « Reply #4 on: April 01, 2007, 11:59:09 PM »
            hey thank's dilbert I didn't know anyone was reading this already.......
            did you check out the rar file I added one of my menu selection project's in
            their for people to look over and try 8)

            I thought it would be cool to show how to use the choice command ;D

            DeltaSpider

              Topic Starter


              Greenhorn

            • When you stop tring you start dieing,DeltaSpider
            • Thanked: 1
              Re: small batch program's I find and make enjoy from DeltaSpider
              « Reply #5 on: April 02, 2007, 12:05:15 AM »
              hey thank's for that set command I've been tring to use some other methods and I'm alway's open to new one's I am still learning myself and
              can use all the pointer's I can get in all type's of programming......

              I will check out that "set/p" command I have heard of it just don't remember
              to much about it right now........thank's again!

              Dilbert

              • Moderator


              • Egghead

              • Welcome to ComputerHope!
              • Thanked: 44
                Re: small batch program's I find and make enjoy from DeltaSpider
                « Reply #6 on: April 02, 2007, 12:12:01 AM »
                No problem. As soon as I get back on WinXP IŽll gladly look at the .rar youŽve got. :)
                "The geek shall inherit the Earth."

                DeltaSpider

                  Topic Starter


                  Greenhorn

                • When you stop tring you start dieing,DeltaSpider
                • Thanked: 1
                  Re: small batch program's I find and make enjoy from DeltaSpider
                  « Reply #7 on: April 02, 2007, 12:22:19 AM »
                  sorry I have'nt had much experience with linux yet but if you post your problem I can do a search today and maybe help you out........

                  this rar is different from the above one....just same name!

                  [old attachment deleted by admin]

                  DeltaSpider

                    Topic Starter


                    Greenhorn

                  • When you stop tring you start dieing,DeltaSpider
                  • Thanked: 1
                    Re: small batch program's I find and make enjoy from DeltaSpider
                    « Reply #8 on: April 02, 2007, 12:28:07 AM »
                    sorry messed up above their different file's looked at them wrong time for me to shutdown for the morning a few hour's anyway talk later gilbert and thank's again! 8)

                    Dilbert

                    • Moderator


                    • Egghead

                    • Welcome to ComputerHope!
                    • Thanked: 44
                      Re: small batch program's I find and make enjoy from DeltaSpider
                      « Reply #9 on: April 02, 2007, 07:38:19 AM »
                      sorry I have'nt had much experience with linux yet but if you post your problem I can do a search today and maybe help you out........

                      this rar is different from the above one....just same name!

                      It's quite simple; I haven't installed anything on Kubuntu to deal with .rar files yet, and Ark is puking over your file for some strange reason. :)

                      EDIT: I was going to say "I'm back in XP and will look at it now", but a quick glance at the K menu tells me: this ain't no Start Menu, and I'm not in XP. I can't believe I didn't notice. :o
                      "The geek shall inherit the Earth."

                      Neil



                        Expert
                      • Fear me Track. Noone can escape my wrath.
                      • Thanked: 3
                        Re: small batch program's I find and make enjoy from DeltaSpider
                        « Reply #10 on: April 02, 2007, 08:44:27 AM »
                        Learn how to use apostrophes or do not use them at all.

                        WillyW



                          Specialist
                        • Thanked: 29
                        • Experience: Experienced
                        • OS: Windows XP
                        Re: small batch program's I find and make enjoy from DeltaSpider
                        « Reply #11 on: April 02, 2007, 09:06:35 AM »
                        - - -
                         How about this: Create a menu allowing users to pick any of those utilities from that menu. YouŽll need to know SET /P to do that. :)

                        How about  choice.com ?
                        :)


                        .



                        ghostdog74



                          Specialist

                          Thanked: 27
                          Re: small batch program's I find and make enjoy from DeltaSpider
                          « Reply #12 on: April 02, 2007, 09:28:14 AM »
                          Quote
                          How about  choice.com ?
                          :)
                          don't think choice.com is in newer win32 distribution. got to download from somewhere else i think

                          WillyW



                            Specialist
                          • Thanked: 29
                          • Experience: Experienced
                          • OS: Windows XP
                          Re: small batch program's I find and make enjoy from DeltaSpider
                          « Reply #13 on: April 02, 2007, 10:01:25 AM »
                          Quote
                          How about  choice.com ?
                          :)
                          don't think choice.com is in newer win32 distribution. got to download from somewhere else i think

                          Really?     If I'd ever learned that before,  I'd forgotten.
                          Thanks.


                          Are you using WinXP now?      can you do a all-over search and tell us if choice.com is found?


                          And -  is it even downloadable?      Legit, I mean.

                          .



                          DeltaSpider

                            Topic Starter


                            Greenhorn

                          • When you stop tring you start dieing,DeltaSpider
                          • Thanked: 1
                            Re: small batch program's I find and make enjoy from DeltaSpider
                            « Reply #14 on: April 02, 2007, 04:37:13 PM »
                            Early in the morning and in a rush, you sometime's forget to add something's or even forget to reply ,to something's with the correct answer!

                            this is in reply to Neil's "Learn how to use apostrophes or do not use them at all."

                            Everyone has their moment's,and I have read enough post's to see that I
                            am not the only person who forget's some can't even finish a sentence
                            correctly!

                            But moving on ,this is about BATCH, English class and school is over for me kid's I graduated from high school along time ago!!!

                            Neil



                              Expert
                            • Fear me Track. Noone can escape my wrath.
                            • Thanked: 3
                              Re: small batch program's I find and make enjoy from DeltaSpider
                              « Reply #15 on: April 02, 2007, 04:56:32 PM »
                              The irony in your reply is self-evident.

                              DeltaSpider

                                Topic Starter


                                Greenhorn

                              • When you stop tring you start dieing,DeltaSpider
                              • Thanked: 1
                                Re: small batch program's I find and make enjoy from DeltaSpider
                                « Reply #16 on: April 02, 2007, 05:27:16 PM »
                                Yeah I figured that much out ,but had to do it anyway!

                                Wasn't tring to be a smart a$$ or anything Neil -just going on with the Batch stuff.
                                If you have anything to add- it's welcomed by all..even I! ok

                                I'm sure you have some search link's in the UK that I don't have access to
                                that have some pretty good batch stuff!
                                Maybe even something that you wrote yourself ! 8)


                                « Last Edit: April 02, 2007, 06:23:39 PM by DeltaSpider »

                                Dilbert

                                • Moderator


                                • Egghead

                                • Welcome to ComputerHope!
                                • Thanked: 44
                                  Re: small batch program's I find and make enjoy from DeltaSpider
                                  « Reply #17 on: April 02, 2007, 10:34:17 PM »
                                  - - -
                                   How about this: Create a menu allowing users to pick any of those utilities from that menu. YouŽll need to know SET /P to do that. :)

                                  How about  choice.com ?
                                  :)


                                  CHOICE doesn't allow for string input, making its use limited.
                                  "The geek shall inherit the Earth."

                                  DeltaSpider

                                    Topic Starter


                                    Greenhorn

                                  • When you stop tring you start dieing,DeltaSpider
                                  • Thanked: 1
                                    Re: small batch program's I find and make enjoy from DeltaSpider
                                    « Reply #18 on: April 03, 2007, 02:09:45 AM »
                                    Any input on how I could use this to clean up my code..

                                    Short cut's are alway's welcome.

                                    I have been altering some of my batch program's but haven't finished
                                    what i'm tring to get them to do yet !

                                    About to download them here and see if anyone has any pointer's for me.



                                    DeltaSpider

                                      Topic Starter


                                      Greenhorn

                                    • When you stop tring you start dieing,DeltaSpider
                                    • Thanked: 1
                                      Re: small batch program's I find and make enjoy from DeltaSpider
                                      « Reply #19 on: April 03, 2007, 02:25:13 AM »
                                      Here is some of the stuff cleaned up some!

                                      Never got the chance with the SET /P command yet!

                                      So let me know if anyone can add or help me out here on what im tring for. ;D

                                      [old attachment deleted by admin]

                                      WillyW



                                        Specialist
                                      • Thanked: 29
                                      • Experience: Experienced
                                      • OS: Windows XP
                                      Re: small batch program's I find and make enjoy from DeltaSpider
                                      « Reply #20 on: April 03, 2007, 07:57:23 AM »
                                      - - -
                                       How about this: Create a menu allowing users to pick any of those utilities from that menu. YouŽll need to know SET /P to do that. :)

                                      How about  choice.com ?
                                      :)


                                      CHOICE doesn't allow for string input, making its use limited.

                                      As in a free form response?     If so,  then yes.

                                      But in this example, as I understood it,  there is a fixed set of responses to choose from,  thus choice would work fine.


                                      Oh well ....   at least he has a choice  of methods.   {nyuk, nyuk, nyuk}
                                       :P
                                      .



                                      ghostdog74



                                        Specialist

                                        Thanked: 27
                                        Re: small batch program's I find and make enjoy from DeltaSpider
                                        « Reply #21 on: April 03, 2007, 09:01:08 AM »
                                        Quote
                                        How about  choice.com ?
                                        :)
                                        don't think choice.com is in newer win32 distribution. got to download from somewhere else i think

                                        Really?     If I'd ever learned that before,  I'd forgotten.
                                        Thanks.


                                        Are you using WinXP now?      can you do a all-over search and tell us if choice.com is found?


                                        And -  is it even downloadable?      Legit, I mean.


                                        here's some info
                                        and no, its not in XP.

                                        WillyW



                                          Specialist
                                        • Thanked: 29
                                        • Experience: Experienced
                                        • OS: Windows XP
                                        Re: small batch program's I find and make enjoy from DeltaSpider
                                        « Reply #22 on: April 03, 2007, 09:44:25 AM »
                                        here's some info


                                        Excellent!      I haven't read much of that yet, but what it is, is obvious.
                                        Thanks.

                                        I wonder if the admins here would like to add a link to that to
                                        http://www.computerhope.com/choicehl.htm   ?

                                        Quote
                                        and no, its not in XP.

                                        Thanks.       And now that I had a quick look at the above referenced link,  the answer was right there all along.   :)

                                        Thanks again.


                                        .



                                        DeltaSpider

                                          Topic Starter


                                          Greenhorn

                                        • When you stop tring you start dieing,DeltaSpider
                                        • Thanked: 1
                                          Re: small batch program's I find and make enjoy from DeltaSpider
                                          « Reply #23 on: April 04, 2007, 02:51:51 AM »
                                          oK HERE IS SOMETHING I WAS WORKING ON YESTERDAY ALITTLE

                                          THIS IS SOME USEAGE OF THE SET /P COMMAND EVERYONE WAS
                                          TALKING ABOUT I COPIED THE INFO FROM COMPUTER HOPE'S DOS
                                          OR BATCH SECTION FORGET WHICH ONE.....

                                          But as for the XP choice.com it's not on my system but,"I do have it"!

                                          Now I like the useage of "SET /P" BETTER !

                                          Download this and see how it look's  and work's for everyone !

                                          Haven't finished it yet, "maybe later today"! 


                                          [old attachment deleted by admin]

                                          DeltaSpider

                                            Topic Starter


                                            Greenhorn

                                          • When you stop tring you start dieing,DeltaSpider
                                          • Thanked: 1
                                            Re: small batch program's I find and make enjoy from DeltaSpider
                                            « Reply #24 on: April 04, 2007, 03:17:10 AM »
                                            Hey  check out the Batch Conversion download's here at computerhope.com

                                            That "autorunpro.exe" is very useful for making your own "setup.exe autorun from disk" file .....

                                            Anyone know more on how to use it with more batch file command's
                                            and such ?

                                            I tried this today but the "Run3=WINHACKXP.BAT" line did not activate!

                                            Just the first two line's worked!!

                                            I was running the "autorunPro.exe" from inside of a folder in "MyDocument's" testing it that could have been part of the problem
                                            since it's suppose to be an autorun for a "DISK" in drive D,E,F or one of the.

                                            Don't know if it mattered  or not but the first line's activated their why wouldn't the batch program......WHAT AM I FORGETING ?????

                                            [Autorun]
                                            open=AutoRunPro.exe /s

                                            [AutorunPro]
                                            Run1=spiderman.gif
                                            Run2="mailto:[email protected]?subject=Have a tip for you"
                                            Run3=WINHACKXP.BAT


                                            Dilbert

                                            • Moderator


                                            • Egghead

                                            • Welcome to ComputerHope!
                                            • Thanked: 44
                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                              « Reply #25 on: April 04, 2007, 06:16:36 PM »
                                              I did not know that CHOICE was not on an XP install... no wonder that part of the DOS tutorial failed three years ago. :)

                                              I love SET /P for writing batch. I haven't used batch in so long, but it's relatively easy to get input and test on it:

                                              Code: [Select]
                                              :CHOICE
                                              SET /P input = "Enter any string>"

                                              IF /I "%input"=="StringOne" GOTO StringOne
                                              REM Etc... etc...

                                              I'm pretty sure I've made a syntactical error (like I said, it's been a while), but you get the idea. :)
                                              "The geek shall inherit the Earth."

                                              DeltaSpider

                                                Topic Starter


                                                Greenhorn

                                              • When you stop tring you start dieing,DeltaSpider
                                              • Thanked: 1
                                                Re: small batch program's I find and make enjoy from DeltaSpider
                                                « Reply #26 on: April 04, 2007, 08:15:44 PM »
                                                I have noticed that alot of command's seem to vary in syntax and useage
                                                from one computer manufactor to the next!

                                                Some time's you have to download a fix or file to help make that command
                                                useable in a batch program !

                                                But.....when you make a .com or .exe file with "bat2exe" some of the
                                                command's don't work correctly or echo's showup even with the
                                                "@echo off" line in the beginning....still working on that one myself!

                                                Yeah Dilbert that set /p stuff was better for me also.....look's less confusing

                                                DeltaSpider

                                                  Topic Starter


                                                  Greenhorn

                                                • When you stop tring you start dieing,DeltaSpider
                                                • Thanked: 1
                                                  Re: small batch program's I find and make enjoy from DeltaSpider
                                                  « Reply #27 on: April 04, 2007, 08:42:56 PM »
                                                  I found some of  the other stuff that everyone and been writing about
                                                  batch file's and been triing to put them in order to see what I could come up with in batch!

                                                  So if anyone see's some part of code they have posted at one  time ..........don't
                                                  think that im triing to still your glory or something.....just look at it as you
                                                  have contributed to a quest of knowledge in batch programming.

                                                  Maybe together we will cover all question's to be asked on this subject
                                                  of batch so I and everyone else can move onto other language's to do
                                                  the same with them...

                                                  I myself have lot's of question's on stuff like how to moniter port's with
                                                  batch ...like when you install a program ...and want to see where all it
                                                  send's file's and stuff or register's DLL file's......

                                                  Basic software monitoring of the system type of stuff I guess it would be!

                                                  But anyway after this I need to learn more on ASM language and
                                                  how to workit with DOS debug command's....

                                                  Then tie into some C or C++ with ASM Lang. incorperated.......tried it one
                                                  time but it did not work the way it was suppose to and after several attemps I said later for that project when I learn some other stuff at a
                                                  lower level like DOS and BATCH !!!!!!!!!

                                                  Dilbert

                                                  • Moderator


                                                  • Egghead

                                                  • Welcome to ComputerHope!
                                                  • Thanked: 44
                                                    Re: small batch program's I find and make enjoy from DeltaSpider
                                                    « Reply #28 on: April 04, 2007, 08:56:41 PM »
                                                    Technically, DOS batch files aren't programming languages; they're interpreted languages. :)
                                                    "The geek shall inherit the Earth."

                                                    DeltaSpider

                                                      Topic Starter


                                                      Greenhorn

                                                    • When you stop tring you start dieing,DeltaSpider
                                                    • Thanked: 1
                                                      Re: small batch program's I find and make enjoy from DeltaSpider
                                                      « Reply #29 on: April 04, 2007, 09:30:13 PM »
                                                      Technically, DOS batch files aren't programming languages; they're interpreted languages. :)

                                                      Is this meaning that they are interpreted by the BIOS ,CMOS or something else........remember Dilbert I haven't been into this stuff until 3 year's ago!

                                                      And triing to understand quickly how it all work's together !

                                                      Here are some other thing's from today I was working on..checkit out!



                                                      [old attachment deleted by admin]

                                                      Dilbert

                                                      • Moderator


                                                      • Egghead

                                                      • Welcome to ComputerHope!
                                                      • Thanked: 44
                                                        Re: small batch program's I find and make enjoy from DeltaSpider
                                                        « Reply #30 on: April 04, 2007, 09:34:06 PM »
                                                        No, it is interpreted by the Command Prompt. :) Compiled programs are .exe files, and .bat files are not. Running BAT2EXE doesn't make them compiled languages, which are translated into Assembler before compilation. :)

                                                        Nice batch apps, though. :)
                                                        "The geek shall inherit the Earth."

                                                        DeltaSpider

                                                          Topic Starter


                                                          Greenhorn

                                                        • When you stop tring you start dieing,DeltaSpider
                                                        • Thanked: 1
                                                          Re: small batch program's I find and make enjoy from DeltaSpider
                                                          « Reply #31 on: April 05, 2007, 01:18:52 AM »
                                                          Hey thank's for deffineing that......really!

                                                          I made some .EXE program's that were compiled with program's like........
                                                          1. realBasic 2006
                                                          2. libertyBasic 4.03 "I think it was!"
                                                          3. DevC++
                                                          4.DevPascal
                                                          5.Qsetup-----installer's maker sorry!
                                                          6.Masm6.??
                                                          7.WinAsm??
                                                          8.RosASM
                                                          9.RADASM
                                                          10.OllyDebugger 1.10--------made binary Executable file and compiled it
                                                                                                      with RosAsm cause I could use it easier!
                                                                                                       Done on a "98 SE windows" with 384MB mem
                                                                                                      and a Intell i386 pent3 processor...
                                                          Currently still triing C++,C,Java,Phython2.?, Pascal,anything free.......

                                                          Have problem's with compiling my own work from scratch but not the example's and tutorial's ......missing something....somewhere!!!!!

                                                          All and thank's for viewing that for me ....still triing some different thing's
                                                          out just haven't formulated anything of use yet!!!

                                                          Should see my screen saver's of different artwork from the Internet I made
                                                          with a program called "AnimatedScreen" they are really cool.....KISS,Halloween,Christmas,Birthday's,Alien,SaintPatric's,all kind's

                                                          You should try it from PYsoftware.com I think!!!

                                                          If you like making your own screensaver's that is..

                                                          If your into Game's I would try "realBasic2006,LibertyBasic 4.??,GameMaker,
                                                          DarkBasic 1.3 ------if you can figure it out!!!!!!!!

                                                          DeltaSpider

                                                            Topic Starter


                                                            Greenhorn

                                                          • When you stop tring you start dieing,DeltaSpider
                                                          • Thanked: 1
                                                            Re: small batch program's I find and make enjoy from DeltaSpider
                                                            « Reply #32 on: April 05, 2007, 01:33:05 AM »
                                                            Couldn't you use the "DOS Debug" to change code ---save to text or reg
                                                            or just text ---to assemble in "Masm or RosAsm" to make an .EXE file or
                                                            as they might call it a"binary executable"

                                                            like a code patch program!!!

                                                             

                                                            Edward

                                                            • Guest
                                                            Re: small batch program's I find and make enjoy from DeltaSpider
                                                            « Reply #33 on: April 06, 2007, 10:37:08 AM »
                                                            I saw the tools, although I do not understand many of the command or tools, I think batching- notice it's a 't' not an 's'- is great.  How can I get my batch file to show me the precentage of completion on the title bar like it does on one of your batch files?  I will be using this batch file to backup local/mapped drives and it will be executed on XP Pro, server 2003 and in the very near future Vista.

                                                            DeltaSpider

                                                              Topic Starter


                                                              Greenhorn

                                                            • When you stop tring you start dieing,DeltaSpider
                                                            • Thanked: 1
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #34 on: April 09, 2007, 06:15:38 AM »
                                                              Hey Edward were you addressing me on one of my batch program's?

                                                              And if so ,what one!

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #35 on: April 12, 2007, 12:04:48 AM »
                                                              Actually, i do not remember which file it was but I saw that there was a percentage progress being shown of some files that were being copied.  It would be great to be able to implement this into my backup batch file.

                                                              Sidewinder



                                                                Guru

                                                                Thanked: 139
                                                              • Experience: Familiar
                                                              • OS: Windows 10
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #36 on: April 12, 2007, 09:25:49 AM »
                                                              This little snippet uses a series of dots to mark progress. The batch file itself does nothing but ping the local host (ie. your PC).

                                                              Code: [Select]
                                                              @echo off
                                                              for /l %%A in (1,1,20) do (
                                                                 <nul (set/p z=.)
                                                                 >nul ping 127.0.0.1 -n 3
                                                                )


                                                              You might be able to use the basic logic in your own files.

                                                              As your batch files become more sophisticated, consider one of the many Windows script languages which have objects and methods to do these sort of things easily.

                                                               8)
                                                              The true sign of intelligence is not knowledge but imagination.

                                                              -- Albert Einstein

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #37 on: April 23, 2007, 10:03:46 AM »
                                                              Can you explain how the script:

                                                              for /l %%A in (1,1,20) do (
                                                                 <nul (set/p z=.)>nul ping 127.0.0.1 -n 3)

                                                              Works?  I am getting a 'ping was unexpected at this time' message.

                                                              Thanks,

                                                              Sidewinder



                                                                Guru

                                                                Thanked: 139
                                                              • Experience: Familiar
                                                              • OS: Windows 10
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #38 on: April 23, 2007, 12:31:42 PM »
                                                              Batch language actually has syntax rules (really!). Generally each command should be on it's own line and the commands are separated with carriage return and line feed indicators. The example posted works just fine for what it was designed to show. By cramming the set and the ping commands into one line, the processor is as easily confused as I am.

                                                              Try using an ampersand (&) to separate the commands:

                                                              Code: [Select]
                                                              for /l %%A in (1,1,20) do (
                                                                 <nul (set/p z=.)>nul & ping 127.0.0.1 -n 3)

                                                              OR

                                                              You could just cut and paste the code from the example and use as is.

                                                              As mentioned, this example really does nothing. Consider if you were copying files. Whether each file was 1 byte or 1MB, they would each display one dot. Hardly an accurate indicator of the batch file's progress. As also mentioned, there are other scripting languages with the tools to correctly show a reasonably accurate progress bar.

                                                               8)
                                                              The true sign of intelligence is not knowledge but imagination.

                                                              -- Albert Einstein

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #39 on: April 23, 2007, 12:46:10 PM »
                                                              So as I am watchins this my batch file is executing in the background? Or do I have have to modify my batch file further?

                                                              Sidewinder



                                                                Guru

                                                                Thanked: 139
                                                              • Experience: Familiar
                                                              • OS: Windows 10
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #40 on: April 23, 2007, 01:34:02 PM »
                                                              Not sure what you mean concerning executing in the background. All batch files need the command processor to execute. If the window is covered by another application, the batch file still executes. If your trying to run this as a windows application you'll need to use a windows script.

                                                              Exactly what are you trying to do?
                                                              The true sign of intelligence is not knowledge but imagination.

                                                              -- Albert Einstein

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #41 on: April 23, 2007, 01:50:56 PM »
                                                              The batch file that I created starts the xcopy process but displays a prompt, which I have automated (although I would like to make it not show at all), and starts showing a scrolling list of all the files that are being copied.

                                                              I would rather have the dots show and hold their place at the top of the window on the screen while the files are being copied and the list is scrolling at the bottom half (Don't know if this is possible in a script though).

                                                              or

                                                              Have the dots show while a specific text is displayed when a specific directory backup has been completed, instead of the file list scrolling.

                                                              Sidewinder



                                                                Guru

                                                                Thanked: 139
                                                              • Experience: Familiar
                                                              • OS: Windows 10
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #42 on: April 23, 2007, 05:06:28 PM »
                                                              Without seeing the file, everything is a guess. Make sure echo is off. Echo is fine for debugging and testing but is counterproductive with all that I/O to the screen. XCOPY has an alphabet soup of switches. Ensure you're using the right ones.

                                                              You already automated the prompt ( ???), but consider sending the output of the XCOPY command to the NUL device. I'm not aware of using batch for splitting the window, so the next best thing would be to get rid of the excess filename displays and let the dots do their thing.

                                                              If you have any other questions please post the file, so we can all sit here and pick it apart and second guess your methods.  ;D Just kidding, but it is easier to discuss something when we can see it.
                                                              The true sign of intelligence is not knowledge but imagination.

                                                              -- Albert Einstein

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #43 on: April 23, 2007, 05:30:44 PM »
                                                              Following is the file that I have created; it is very basic.  I must mention that I am a rookie at this and I know there will be a lot of corrections and suggestions.  My main use of this script will be on a Windows 2003 server, XP pro and Vista.  I found out that the sleep command is not available for XP.

                                                              @ECHO OFF

                                                              COLOR 9B

                                                              :Procedures
                                                              ECHO+
                                                              ECHO+
                                                              ECHO    You are starting the Automated backup procedure!
                                                              ECHO+
                                                              ECHO    To Cancel the backup process, press 'Ctl' + 'C'
                                                              ECHO+
                                                              ECHO+
                                                              SLEEP 2
                                                              PAUSE

                                                              :BackupStartMessage01
                                                              SLEEP 2
                                                              ECHO+
                                                              ECHO+
                                                              ECHO The backup process has now been started...
                                                              SLEEP 3

                                                              <Here is where I would assume the insertion of the dot script>

                                                              :Log Backup-Start
                                                              @ECHO %date% Backup STARTED at %time% on workstation %computername% >> F:\Backups\Division01backup\backuplog.log

                                                              :Backup01
                                                              ECHO+
                                                              ECHO Now starting first process!
                                                              ECHO+
                                                              ECHO A | Xcopy "X:\Box01" "F:\Server01\Division01\Folder01" /S /E /V
                                                              ECHO+

                                                              :Endof01 Backup01
                                                              SLEEP 3
                                                              ECHO Folder backup has been completed!
                                                              ECHO+
                                                              ECHO+

                                                              :Backup02
                                                              SLEEP 2
                                                              ECHO A | XCOPY "X:\storage\Box02" "F:\Backups\Division01LBACKUP\Folder02" /E /S /V
                                                              ECHO+
                                                              SLEEP 2
                                                              ECHO+
                                                              ECHO Folder backup has been completed!
                                                              ECHO+
                                                              ECHO+

                                                              :Complete
                                                              SLEEP 4
                                                              ECHO+
                                                              ECHO+
                                                              ECHO BACKUP PROCESS IS NOW COMPLETE!


                                                              :Log Backup End
                                                              ECHO A log file is now being creted
                                                              SLEEP 2
                                                              ECHO %date% Backup ENDED   at %time% on workstation %computername% >> F:\Backups\Division01backup\backuplog.log

                                                              sleep 3
                                                              ECHO Log file successfully created!
                                                              ECHO+
                                                              ECHO+


                                                              SLEEP 3
                                                              ECHO+
                                                              ECHO+
                                                              ECHO     Y O U   M A Y   N O W   C L O S E   T H I S   W I N D O W !
                                                              ECHO+
                                                              ECHO+

                                                              SLEEP 20

                                                              Sidewinder



                                                                Guru

                                                                Thanked: 139
                                                              • Experience: Familiar
                                                              • OS: Windows 10
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #44 on: April 23, 2007, 06:36:27 PM »
                                                              Under the circumstances I would forget about a progress bar  and leave your file as is. The problem lies with the use of XCOPY; there is no way to insert any logic each time XCOPY grabs another file to copy. With the use of only two XCOPYs, you'd end up with two dots!!

                                                              Batch files are not multi-threaded. You can't have one process (the progress bar) chugging away in one thread, while another process (XCOPY) chugs along in another thread.

                                                              Re-designing this file to use a for loop and to use COPY and to maintain directory structure is not really justified when you have something that already works.

                                                              First rule of coding is KISS

                                                               8)

                                                              I never knew that echo+ produced a blank line.
                                                              « Last Edit: April 23, 2007, 06:46:35 PM by Sidewinder »
                                                              The true sign of intelligence is not knowledge but imagination.

                                                              -- Albert Einstein

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #45 on: April 24, 2007, 10:01:54 AM »
                                                              I guess I will keep it as is with XCOPY.  From what I understood a regular copy does not allow the copying of subfolder especialy if they are empty.  I do need to structure a way in which I can have the files backed up on Tuesday go to a folder called Tuesday and so on.  What would be the best lay out for this?

                                                              Sidewinder



                                                                Guru

                                                                Thanked: 139
                                                              • Experience: Familiar
                                                              • OS: Windows 10
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #46 on: April 24, 2007, 03:53:54 PM »
                                                              Depending on your regional settings, you can use the value of the date command:

                                                              Code: [Select]
                                                              @echo off
                                                              for /f "tokens=1,2" %%x in ('date /t') do (
                                                              set dow=%%x
                                                              )
                                                              if %dow%=Mon set folder=c:\Monday
                                                              if %dow%=Tue set folder=c:\Tuesday
                                                              .
                                                              .
                                                              .

                                                              Try running the date /t command at the command prompt. You may not even have the day of week showing in the output which will make this all the more difficult.

                                                              Good luck. 8)
                                                              The true sign of intelligence is not knowledge but imagination.

                                                              -- Albert Einstein

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #47 on: April 26, 2007, 03:20:46 PM »
                                                              This is the output I use as the default for all machines: Thu 04/26/2007

                                                              @echo off
                                                              for /f "tokens=1,2" %%x in ('date /t') do (
                                                                 set dow=%%x
                                                                 )
                                                              if %dow%=Mon set folder=c:\Monday
                                                              if %dow%=Tue set folder=c:\Tuesday

                                                              I would assume that in the two 'if' lines I have to specify the direct path to the folders I have created?  Will all these commands work on XP pro?

                                                              Edward

                                                              • Guest
                                                              Re: small batch program's I find and make enjoy from DeltaSpider
                                                              « Reply #48 on: April 27, 2007, 03:01:46 PM »
                                                              Sidewindes,

                                                              I placed the code that you provided and got a '=Mon was unexpected at this time' message.  What are the areas I must modify other than the folder paths?  Is there something I missed?