Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Redirecting (BatchFile) System Responses in Windows Mode

    I'm using Windows 7 & I have a batch file.

    TESTCOPY.BAT
    delete abcd.txt
    md jpg-folder
    copy efgh.jpt jpg-folder
    etc

    In CMD mode, if I enter TESTCOPY.BAT >ABC.TXT 2>&1 the commands and system responses (such as "subdirectory or file JPEG already exists", "file not found") are sent to the ABC.TXT file.

    In "Windows mode", if I double click on the TESTCOPY.BAT file icon the commands are executed, but the system responses are "lost".

    Is there a way, in "Windows mode", to capture the system responses?

  • #2
    New Coder
    Join Date
    Feb 2007
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi JARHTMD,

    I've found something in the net and hope it works. You may try TESTCOPY.BAT >ABC.TXT 2<&1 in command mode.


    Newbie

  • #3
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, Newbie.

    That's what I've been doing. I'm now passing the task off to someone who is completely unfamiliar with bat files, cmd mode, etc. I want to avoid their having to switch to cmd mode. He/she needs instructions no more complicated than "Double click on TESTCOPY.BAT".

    After further thought, My best solution is to add a PAUSE as the last command in the .BAT file. Now after double clicking on TESTCOPY.BAT, the CMD window will remain open for review, instead of disappearing in a flash.

    I had hoped to stay in Windows mode, yet still be able to capture the results in a .TXT file.

    Jim

  • #4
    New Coder
    Join Date
    Feb 2007
    Posts
    94
    Thanks
    0
    Thanked 0 Times in 0 Posts
    O.K. I See


  •  

    Posting Permissions

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