Windows 10: How to add a timeout when running a batch script in windows recovery command prompt ?

Discus and support How to add a timeout when running a batch script in windows recovery command prompt ? in Windows 10 Software and Apps to solve the problem; Without going into details, I need to run a batch script to copy all the files and folders from a failing ssd drive to another disk one file at a time.... Discussion in 'Windows 10 Software and Apps' started by HalfErmine86729, Dec 27, 2022.

  1. How to add a timeout when running a batch script in windows recovery command prompt ?


    Without going into details, I need to run a batch script to copy all the files and folders from a failing ssd drive to another disk one file at a time. I am using below batch script but windows recovery mode command prompt is not recognizing timout as a valid command. How can I induce a sleep wait between each operation. for %%a in "%source%\*" do xcopy "%%~fa" "%destination%" /y /w echo "copied" %%~fa timeout 2 > nul Thank You

    :)
     
    HalfErmine86729, Dec 27, 2022
    #1

  2. Batch "timeout" command not orking

    I tried it in the command prompt and inside a batch file. I have tried to use this command in many different batch scripts and still get the same error. I am not facing any issues with windows as far as I can tell.

    Some other batch commands do not work either, such as ping or tree, but I can do almost everything else such as create files, insert items into files, display text, and change text color.
     
    fishyydrib, Dec 27, 2022
    #2
  3. Batch "timeout" command not orking

    Are you going to help me or act like you are, and not. I answered your questions, now give me an answer!
     
    fishyydrib, Dec 27, 2022
    #3
  4. How to add a timeout when running a batch script in windows recovery command prompt ?

    Running PowerShell script as a batch file

    Hello Baldo,



    Thank you for writing to Microsoft Community Forums.



    I understand that you want to execute the PowerShell commands as a batch file.



    I tried executing the batch file on my machine but I was unable to execute it as the command was incomplete. However, after making some changes in the command I was able to execute the batch file.



    You can try the following command by saving it in a batch file and check if that helps.



    powershell –Command Get-AppxPackage Microsoft.3dBuilder | Remove-AppxPackage



    Also, as the query is related to running a PowerShell script using a batch file, I suggest you to post the issue on

    TechNet
    forums where we have professionals who have more knowledge about the issue.



    Hope it helps.



    Regards,

    Prakhar Khare

    Microsoft Community – Moderator
     
    Prakhar_Khare, Dec 27, 2022
    #4
Thema:

How to add a timeout when running a batch script in windows recovery command prompt ?

Loading...
  1. How to add a timeout when running a batch script in windows recovery command prompt ? - Similar Threads - add timeout running

  2. Command Prompt - Unable to type while running batch

    in Windows 10 Gaming
    Command Prompt - Unable to type while running batch: While I am running a batch in Command Prompt, it dosen't let me type when it asks me a question and I answer Y or N. Does anyone know how to fix this?...
  3. Command Prompt - Unable to type while running batch

    in Windows 10 Software and Apps
    Command Prompt - Unable to type while running batch: While I am running a batch in Command Prompt, it dosen't let me type when it asks me a question and I answer Y or N. Does anyone know how to fix this?...
  4. Batch "timeout" command not waiting as supposed to

    in Windows 10 Gaming
    Batch "timeout" command not waiting as supposed to: I have the command TIMEOUT /T 8 coded into batch files that have worked for ages. Suddenly it's no longer waiting for the timeout, just immediately exits.If I run it manually from a cmd.exe window prompt, it works. In a batch file .. 99% of the time it fails. It will display...
  5. Batch "timeout" command not waiting as supposed to

    in Windows 10 Software and Apps
    Batch "timeout" command not waiting as supposed to: I have the command TIMEOUT /T 8 coded into batch files that have worked for ages. Suddenly it's no longer waiting for the timeout, just immediately exits.If I run it manually from a cmd.exe window prompt, it works. In a batch file .. 99% of the time it fails. It will display...
  6. How to add a timeout when running a batch script in windows recovery command prompt ?

    in Windows 10 Gaming
    How to add a timeout when running a batch script in windows recovery command prompt ?: Without going into details, I need to run a batch script to copy all the files and folders from a failing ssd drive to another disk one file at a time. I am using below batch script but windows recovery mode command prompt is not recognizing timout as a valid command. How can...
  7. How to add a timeout when running a batch script in windows recovery command prompt ?

    in Windows 10 Installation and Upgrade
    How to add a timeout when running a batch script in windows recovery command prompt ?: Without going into details, I need to run a batch script to copy all the files and folders from a failing ssd drive to another disk one file at a time. I am using below batch script but windows recovery mode command prompt is not recognizing timout as a valid command. How can...
  8. Command Prompt/ Batch files

    in Windows 10 Ask Insider
    Command Prompt/ Batch files: [ATTACH] when i create a batch file to ping something, it spams the command and throws no response. how do i fix this? https://preview.redd.it/fyy6qwrfx7n61.png?width=256&format=png&auto=webp&s=d55552fdc7a5c297d565617f710992048238660c submitted by /u/xWasss [link]...
  9. Add command prompt (and with that any batch file) to boot process?

    in Windows 10 Ask Insider
    Add command prompt (and with that any batch file) to boot process?: I would like, as part of my boot process, to include a command prompt or command line interface at full screen. So before the laptop branding pops up, I have something that says "C>" or something. That would do a few things. A) Make it easier to access the command prompt if...
  10. Syntax for Batch file &/or powershell script to run multiple commands

    in Windows 10 Support
    Syntax for Batch file &/or powershell script to run multiple commands: I wanted a batch file to run the following commands: Start Powershell as administrator cd "C:\Program Files\Macrium\Reflect" regsvr32 RContextMenu.dll regsvr32 RShellEx.dll I can get as far as: Code: echo Start "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" cd...