1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Batch File for Data Request

Discussion in 'Software Development' started by lstoltman, Mar 16, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. lstoltman

    lstoltman Thread Starter

    Joined:
    Mar 16, 2011
    Messages:
    3
    Hello here is what I am wanting to do. I would like to write a batch file that I can put on a thumb drive and run to gather the following information off a pc. The first thing I would like for it to do is when I run the file is it to create a new folder such as the devices Asset ID number ( I would like it to say something like please enter Asset Number, once entered I would like that to become the folder the information extracted goes to). Next I want to collect the following information instead of typing it out on every device I go to:
    1. "ipconfig /all > Z:\AID_123456\ipconfig.txt"
    2. "netstat -ano > Z:\AID_123456\netstat.txt"
    3. "tasklist > Z:\AID_123456\tasklist.txt"
    4. "systeminfo > Z:\AID_123456\systeminfo.txt"
    5. "net share > Z:\AID_123456\netshare.txt"
    6. "arp -a > z:\AID_123456\arp.txt"
    7. "copy C:\Windows\system32\drivers\etc\hosts Z:\AID_123456\hosts"

    Any help on this project would be greatly appreciated.
     
  2. lstoltman

    lstoltman Thread Starter

    Joined:
    Mar 16, 2011
    Messages:
    3
    Anyone out there with a clue on how to do this?
     
  3. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    You pretty much have it all written. You know what the commands are so just put all those commands into a text file and name it with a BAT file extension.
     
  4. lstoltman

    lstoltman Thread Starter

    Joined:
    Mar 16, 2011
    Messages:
    3
    I do use these as they are in the following format. I still need assistance with when I plug the USB device into a unit to get the files into a folder generated by a user input. I want to be able to run the batch file create a folder and name it as I see fit and then send the files above that are generated into the folder.

    Thanks for you response
     
  5. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    You would use the SET command to take the user input and the MD command to create the directory.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/986277

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice