Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Programming Question

Programming Question

Scheduled Pinned Locked Moved The Lounge
questionxml
161 Posts 124 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dalek Dave

    Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

    --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

    B Offline
    B Offline
    bonjedward
    wrote on last edited by
    #103

    They're useful for calling other programs. For example here if perl is not in the PATH on all PCs - if it is, that's the one to use, but if not, try a known location: perl c:\Offline\Computer\GMobileSubsets\scripts\perl\fetch.pl HNG %1 %2 if ERRORLEVEL 1 goto tryagain exit pause :tryagain C:\perl\bin\perl c:\Offline\Computer\GMobileSubsets\scripts\perl\fetch.pl HNG %1 %2 if ERRORLEVEL 1 goto err exit pause :err pause >nul Perl error! Contact IT. Press any key (I always have pause after exit, so I can quickly add REM in front of exit when testing The same applies in a mixed 32/64 bit environment: C:\Program Files (x86)\ or C:\Program Files\ Also, when calling sequences of taskkill, file copy/delete, etc - you can put a shortcut on the desktop to it. Easier than remembering a long list of services to be restarted in a particular order, etc. Useful for colleagues if your not available - "just log in to the server and click on the shortcut" Also, on Windows 7, some users need local administrator rights to run taskkill, etc, but need their own identity when accessing network files. Create an exe file to run a bat file as admin, but use it only on those batfiles requiring it: C:\Offline\Computer\GMobileSubsets\sw\runaLocalAdmin.exe C:\Offline\Computer\GMobileSubsets\scripts\bat\stopall_reqadmin.bat

    1 Reply Last reply
    0
    • D Dalek Dave

      Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

      --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

      T Offline
      T Offline
      Thomas Vanderhoof
      wrote on last edited by
      #104

      I'm 36 and use .bat files to backup data in certain folders using robo copy commands on a scheduled task. Why pay for backup programs when you can make a quick script for free.

      1 Reply Last reply
      0
      • D Dalek Dave

        Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

        --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

        M Offline
        M Offline
        Member 4551201
        wrote on last edited by
        #105

        Do you still use Edlin? ;)

        1 Reply Last reply
        0
        • D Dalek Dave

          Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

          --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

          U Offline
          U Offline
          User 8634007
          wrote on last edited by
          #106

          I do it daily! Good Ole'bats! I hard code all internet pages and have a slick program built in access that creates the bat and ftp to do all of my bidding. Its safer, cleaner, fast and far better than drag and drop or any other method I can find for ftping. The access programs archives and does just about evrything else too. But... in computer years, I too am an "Old fogie." It's sort of odd when you have been programming vb longer than some of young'ns who are programming today have been alive, and that says nothing of having worked the basic "Basic". But hey don't let the gray hair fool you, I can still keep up with the best of them! hmmm... So I hear through the grape vine that you were "the poster of the One Millionth Lounge Post"

          1 Reply Last reply
          0
          • D Dalek Dave

            Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

            --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

            G Offline
            G Offline
            GI_Giorgio
            wrote on last edited by
            #107

            Do not feel alone! we are a bunch of programmers that we use bat files to do daily tasks (stored procedures por instance). And not just in DOS also in UNIX... everything to do the job! Greatings @GI_Giorgio

            1 Reply Last reply
            0
            • D Dalek Dave

              Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

              --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

              S Offline
              S Offline
              samuel adams
              wrote on last edited by
              #108

              Looks like there are a lot of old fogies here:) I don't write as many as I used to, but there are cases where a bat file is quicker/easier to write and anyone can maintain. It also keeps me from having to rewrite all the dos commands that already exist. If microsoft ever gets rid of the command line, I'm switching to Linux.

              1 Reply Last reply
              0
              • D Dalek Dave

                Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                E Offline
                E Offline
                Erik Rude
                wrote on last edited by
                #109

                I do. They are incredibly good for some tasks. Tasks that would take 4 hours in a quick and dirty VBA app hacked by an apprentice can take mere minutes if you remember the DOS commands, thus saving the day. Now do you use the vi-editor?

                1 Reply Last reply
                0
                • D Dalek Dave

                  Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                  --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                  J Offline
                  J Offline
                  jcdmelo
                  wrote on last edited by
                  #110

                  I do write BAT files - and have never gave up on them ever since my IBM PCJr. - once in a while to: - automate repetitive shell commands - setup a path - perform string or repetitive operations on a bunch of files which depends on a search in the current directory. To "kill the snake and show the stick" (a popular saying in Brazil which denotes "to show that you have really done it") here's a simple example: for /D %%i in (*) do dir /s "%%i" >> dirs.txt Julio Cezar

                  1 Reply Last reply
                  0
                  • D Dalek Dave

                    Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                    --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                    J Offline
                    J Offline
                    jsc42
                    wrote on last edited by
                    #111

                    I still use BAT files as they are straight forward and capable of some useful tricks. One of my recent applications had a GUI front end but the users wanted a batch interface to start / stop / pause / resume it remotely. Simple with batch files: start = single command line to run the application, others = single command line to post a message to the application's input queue (e.g. ECHO PAUSE >>%TEMP%\_applicationname__StatusChange.txt). Then all I had to do was to create shortcut desktop icons to run the batch files and they think that they have a button controlled interface.

                    1 Reply Last reply
                    0
                    • R richard_k

                      Heh.. first job at a large computer firm I had was writing job decks and algol programs at Unisys. With punch cards! Cards were on their way out when I did this.. but you could still find folks with large card decks on their desks.

                      S Offline
                      S Offline
                      SkipSailors
                      wrote on last edited by
                      #112

                      JCL R00lz!

                      Ship it!

                      R 1 Reply Last reply
                      0
                      • D Dalek Dave

                        Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                        --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                        J Offline
                        J Offline
                        jsc42
                        wrote on last edited by
                        #113

                        For several years, I was involved with helping at a programming competition run by one of Europe's foremost national computing organisations (name not disclosed for obvious reasons). We had the brightest and best teams from academia and professional companies competing in it. We never told the teams that our sophisticated testing, scoring, and marking system that compiled, ran, timed, and collated all of their competition entries was a single monolithic BAT file. Admittedly, it grew over the years as more languages and external dependencies were added to the scope of the competition, but it was still a BAT file.

                        1 Reply Last reply
                        0
                        • D Dalek Dave

                          It's a shame Henry isn't here He could tell us of his days poking holes in cards!

                          --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                          I Offline
                          I Offline
                          Isfeasachme
                          wrote on last edited by
                          #114

                          Hey! My first job was repairing those things for the Dept of the Navy :) ... in 1992... in Nashville. Figure that out! LOL

                          1 Reply Last reply
                          0
                          • D Dalek Dave

                            Yes Pete, but alas you are venerable and aged, like me. I bet them young whippersnappers don't!

                            --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                            I Offline
                            I Offline
                            Isfeasachme
                            wrote on last edited by
                            #115

                            I'll be interested to hear how I should be doing this... but I've got batch files sitting on remote servers that create a quick backup of existing code, deploy code from subversion and sync up secondary servers.

                            1 Reply Last reply
                            0
                            • D Dalek Dave

                              Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                              --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                              U Offline
                              U Offline
                              Unused Account Safe to Delete
                              wrote on last edited by
                              #116

                              Well, here in Cuba the whole process of grading the National Programming Contest for High School students is done using bat files. The last one I made for that earned me the nickname "batman".

                              1 Reply Last reply
                              0
                              • S SkipSailors

                                JCL R00lz!

                                Ship it!

                                R Offline
                                R Offline
                                richard_k
                                wrote on last edited by
                                #117

                                Actually, on Unisys mainframes it is called 'Work Flow Language' (WFL, or as everyone called it 'wiffle'). I wrote a lot of that in the mid 80s.

                                1 Reply Last reply
                                0
                                • D Dalek Dave

                                  Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                                  --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                                  F Offline
                                  F Offline
                                  Floydslips
                                  wrote on last edited by
                                  #118

                                  I still write an occasional batch file, although I use the newer .CMD file extension. For more advanced needs, I rely on WinBatch.

                                  1 Reply Last reply
                                  0
                                  • D Dalek Dave

                                    Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                                    --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                                    C Offline
                                    C Offline
                                    Conan Callen
                                    wrote on last edited by
                                    #119

                                    Whateva does the job. My favorite has always been Kornshell. Powershell is cool, but seems to lack the elegance of some of the Unix Shells. .bat files are quick and easy, take very little setup/configuration. However, I emphisize with younger programmers, who want to use something new, or improve make thier skill set more competitive. Just remember that if you dont want to box yourself in (kill any oportunity for promotion), dont make it so complex that someone will never be albe to replace you.

                                    1 Reply Last reply
                                    0
                                    • P Pete OHanlon

                                      I have been known to write the odd .bat file, as well as PowerShell scripts.

                                      *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                                      "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                                      My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility

                                      D Offline
                                      D Offline
                                      Derek Altamirano
                                      wrote on last edited by
                                      #120

                                      I still use .cmd files quite a bit (haven't done .bat's since moving to NT; I still use the term batch file, though I think the proper term for a .cmd is command file :-D). Although I am learning to use PowerShell more, I can still usually whip out a batch file much quicker, depending on what I am doing, though I expect that will change as I become more fluent in PS. I have written some pretty neat and complex batch scripts in recent years (man do I love that for command!).

                                      1 Reply Last reply
                                      0
                                      • D Dalek Dave

                                        Who (apart from my good self) still writes .bat files? Are they common or am I one of the old fogies that still employs his DOS knowledge?

                                        --------------------------------- I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] English League Tables - Live

                                        G Offline
                                        G Offline
                                        galumpa
                                        wrote on last edited by
                                        #121

                                        I'm 4 years out of the university and have only used a .bat file recently when I switched companies. Previously I used shell scripts.

                                        L 1 Reply Last reply
                                        0
                                        • R richard_k

                                          Heh.. first job at a large computer firm I had was writing job decks and algol programs at Unisys. With punch cards! Cards were on their way out when I did this.. but you could still find folks with large card decks on their desks.

                                          E Offline
                                          E Offline
                                          Earl Truss
                                          wrote on last edited by
                                          #122

                                          My first real program in my first real programming job was written in CDC 6000 assembler on two boxes of cards. I try to forget how I would have to make corrections to the cards and then read them back in again to test it. Oh, and yes, I still have a few BAT files that are in use. Don't write very many new ones much any more.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups