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

Author Topic: Savin batch file results  (Read 6779 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Savin batch file results
« Reply #15 on: March 21, 2012, 11:01:04 AM »
OK. Now I will be plain and serious.
Using voice recognition. Please harden the mistakes.

Apparently you're an administrator and this is the serious real world application and not just some exercise.  Therefore, allocating the best answer I can think of that would apply to your situation.
http://en.wikipedia.org/wiki/Cross-platform
In this kind of situation divide and conquer is the road you need to use.  You can divide the tasks up into the different parts and find from that how to create a cross platform solution.  Perhaps you are anywhere the issues, but allow me to include a reference from which up the young about what cross platform means that the current time.
In times past, the most common language for most small computers and workstations was some variation in BASIC. However, that is no longer the case in the bBASIC dialects does not have enough folks into the system calls.
Currently in commercial work the tools are commonly used as cross platform scripts or interpreters are:
Pearl
Python
Java
of course, the disease must have some type of run time library or module that ties the script interpreter into the system of local workstation.  So that means the run-time package will have to be installed on every workstation, and different workstations will have to have different run-time libraries.  But once that is done, they are after the same script should be usable on all machines in your group.
Here's another approach.  Let's sing the majority of your machines are Windows machines.  Perhaps just one or two or Linux based.  For the Linux machines you have a two-level approach.  The script would be sent to the Linux machines, but in such a way that another type of L. would be interpreted.  You have a new shell, a custom-made shale, that interprets the MS-DOS commands and converts them into appropriate commands for Linux.  So you'd be running and interpreter and inside interpreter, so to speak.  The good part of this is blacks can accommodate many different types of shells.  Look around and you'll probably find a custom shale somebody has created that emulates the MS-DOS commands.
I do really want to help you, I thought a little commentary might help you get out of the box.  And think of alternate solutions.
One more I am.  If you're working in HTML, the conflict between Windows and UNIX no longer exists as to file name descriptions.  Both Windows and UNIX systems have to agree on file names inside the HTML context.  What that means is inside the browser with file-names have the forward symbol instead of the backward symbol.  So that would suggest the idea of using JavaScript inside the HTML page. Stop voice recognition

NOTE: JavaScript is part of the browser and nada in common with Java.
Except the name.

Squashman



    Specialist
  • Thanked: 134
  • Experience: Experienced
  • OS: Other
Re: Savin batch file results
« Reply #16 on: March 21, 2012, 12:42:30 PM »
I believe i found a solution that works, as windows does not like to save files with the ":", "/" or any other punctuarion

Code: [Select]
info.bat>%time:~0,2%-%time:~3,2%_%date:~10%-%date:~4,2%-%date:~7,2%.txt
How is this for the code?? does anyone find an error?? This saves the results with a timestamp, but i am unable to save multiple files.
Either append to the file or use the Computer Name variable as part as the output file name.

To get the IP address you could do this.
Code: [Select]
:: Note: the following code will extract only the last IP address from the list
FOR /F "TOKENS=2* DELIMS=:" %%A IN ('IPCONFIG /ALL ^| FIND "IP Address"') DO FOR %%B IN (%%A) DO SET IPADDR=%%B

zeroburn

    Topic Starter


    Hopeful

  • Knowlege will take you further than any guide
  • Thanked: 2
    • Yes
    • Jared Kat Enterprises
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: Savin batch file results
« Reply #17 on: March 27, 2012, 09:41:40 PM »
Thanks geek, and i am going into some more advanced programming, right now that is over microsoft visual basic applications, but soon i will be trying for Java.

I will post appropriate questions for java when i actually get into it in the appropriate topic.
I consider myself a hacker. Not in the way of "I can break into your facebook" but in the way, I like to learn as much as I can, about anything i can. I don't just like having things fixed, I like to understand why it was broken and why a particular solution fixed it. It is just how I am, and how I will always be. As teachers have said before, you cant learn if you don't figure it out in your own mind.