+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, File Export Naming in Coding and Web Development; Hello, I've got a batch process to export system information and I want to make a batch file to do ...
  1. #1
    MaceZ4's Avatar
    Join Date
    Dec 2010
    Location
    Lots of different places...
    Posts
    129
    Thank Post
    12
    Thanked 12 Times in 8 Posts
    Rep Power
    10

    Cool File Export Naming

    Hello,

    I've got a batch process to export system information and I want to make a batch file to do it for all computers on site, however the way I've written it they'll all be called "001.txt"

    How do I create each file named after the computer it came from?

    I tried %HostName%.txt and it called the file exactly that...

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,696
    Thank Post
    335
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    echo Hello world! >> %computername%.txt

    etc

    Steve

  3. Thanks to Steve21 from:

    MaceZ4 (19th June 2012)

  4. #3
    MaceZ4's Avatar
    Join Date
    Dec 2010
    Location
    Lots of different places...
    Posts
    129
    Thank Post
    12
    Thanked 12 Times in 8 Posts
    Rep Power
    10
    Thanks that's the one I was looking for..!

SHARE:
+ Post New Thread

Similar Threads

  1. File Servers / Naming
    By markbayliss in forum Windows Server 2008 R2
    Replies: 4
    Last Post: 5th January 2011, 01:41 PM
  2. Copy file across variable folder name
    By SimpleSi in forum *nix
    Replies: 11
    Last Post: 10th March 2009, 06:15 PM
  3. Exporting File names from a disc.
    By Neville in forum Windows
    Replies: 2
    Last Post: 25th February 2009, 12:58 PM
  4. Replies: 5
    Last Post: 28th May 2008, 10:37 PM
  5. Robocopy & long file names
    By cheryl in forum Windows
    Replies: 2
    Last Post: 18th January 2008, 10:27 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •