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 22694 times)

0 Members and 1 Guest are viewing this topic.

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