Errors and Solutions

Thursday, January 31, 2019

[DOS] Call more than one command in For Loop



Add '&'

here is an example:

FOR /D %%P IN ("*HQ*") DO ECHO DELETING "%%P" & PAUSE & IF EXIST "%%P" RD /S /Q "%%P"
Posted by Hoon at 6:56 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Hoon
View my complete profile

Blog Archive

  • ►  2021 (1)
    • ►  May (1)
  • ▼  2019 (26)
    • ►  May (1)
    • ►  April (1)
    • ►  March (9)
    • ►  February (5)
    • ▼  January (10)
      • [CodedUI] MS batch file example to run Web Perform...
      • [DOS] Call more than one command in For Loop
      • [Visual Studio] Visual Studio move project to a di...
      • [Visual Studio] How to actually search all files i...
      • [SSMS] Cannot insert explicit value for identity c...
      • [Excel] Scroll Locked - Arrow Key not moving
      • [MS Word] Font Size
      • [Coded UI] find matching control for wintabpage
      • [Coded UI] ADO.NET provider with invariant name 'S...
      • [MS Word] insert a blank line before a table in th...
  • ►  2018 (7)
    • ►  October (2)
    • ►  September (3)
    • ►  July (2)
  • ►  2017 (2)
    • ►  October (1)
    • ►  September (1)
  • ►  2015 (2)
    • ►  September (2)
Simple theme. Powered by Blogger.