Need a bit of help with windows commands/command prompt

  • I've written up a little .bat thing to display my Construct 2 project's debug-log .txt file in the form of a command/debug console, and two days ago, it was working fine until some sudden unexpected issue. As of now, it's behaving strangely on one front. The .bat is supposed to run a loop that display's my log-file's contents and would leave the log-file alone and let it stay put. I'm 100% sure it did that but now, it's deleting said log bizarrely despite showing the messages in the contents; and the file being deleted interferes with my project's C2 eventsheets (where it backups the log-file via nwjs commands). I'm not sure if the recent Windows 10 update yesterday broke my .bat or if I just accidentally fubared it.

    My .bat's contents:

    Echo off

    title A-RPG Gamekit Debug Console

    :loop

    if exist currentsessionlog.txt type currentsessionlog.txt

    if exist currentsessionlog.txt del currentsessionlog.txt > nul

    timeout 1 > nul

    goto loop

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • But you’re telling it to delete the file in that script. Sounds like it’s working correctly.

    I suppose it may not have deleted the file before if the file was currently being accessed by something else, so it couldn’t be deleted.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)