fork download
  1. copy
  2. batch
  3.  
  4. @echo off
  5.  
  6. REM Get current date and time
  7. set CURRENT_DATE=%date:/=-%
  8. set CURRENT_TIME=%time::=-%
  9.  
  10. REM Create a timestamp for the filename
  11. set TIMESTAMP=%CURRENT_DATE%_%CURRENT_TIME%
  12.  
  13. REM Define output file name
  14. set OUTPUT_FILE=system_report_%TIMESTAMP%.txt
  15.  
  16. REM Create tree listing of C: drive and save to output file
  17. (
  18. echo Current Date: %CURRENT_DATE%
  19. echo Current Time: %CURRENT_TIME%
  20. echo.
  21. echo Tree listing of C: drive:
  22. echo ==========================
  23. tree C:\ /F /A
  24. ) > "%OUTPUT_FILE%"
  25.  
  26. echo Report generated successfully: %OUTPUT_FILE%
  27.  
Success #stdin #stdout #stderr 0.01s 5284KB
stdin
Standard input is empty
stdout
Report generated successfully: %OUTPUT_FILE%
stderr
./prog.sh: line 1: copy: command not found
Cannot access user database: Success
./prog.sh: line 4: @echo: command not found
./prog.sh: line 6: REM: command not found
./prog.sh: line 10: REM: command not found
./prog.sh: line 13: REM: command not found
./prog.sh: line 16: REM: command not found
./prog.sh: line 24: %OUTPUT_FILE%: Permission denied