Batch Scripts / Programs.

Page 12 of 16 FirstFirst ... 21011121314 ... LastLast

  1. Posts : 7,606
    Windows 10 Home 20H2
       #111

    Paul Black said:
    The first screenshot below shows the correct desktop.
    The second one shows the output of the above script.

    Batch Scripts / Programs.-my-desktop.jpg
      My Computer


  2. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #112

    Hello Matthew,

    So you are saying that this is the one to be used for Win 10? . . .

    Code:
    for /f "tokens=*" %%X in ('"PowerShell (New-Object -ComObject Wscript.Shell).SpecialFolders(4)"') do (set "Desktop=%%X")

    If so > PowerCFG_Detailed_Analysis_Hemimax_2.bat

    He already has ALL the information that he needs from running the Commands in CMD Prompt anyway. As I said, for ALL the times that the file has been downloaded, there has NOT been a problem before.
      My Computer


  3. Posts : 7,606
    Windows 10 Home 20H2
       #113

    Paul Black said:
    I ran the above and got the following:

    Batch Scripts / Programs.-error.jpg
      My Computer


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #114

    Hello Matthew,

    I uploaded the wrong file, now corrected above.
      My Computer


  5. Posts : 7,606
    Windows 10 Home 20H2
       #115

    Paul Black said:
    I uploaded the wrong file, now corrected above.
    I ran it. The variable %DT_Folder% got the correct path "D:\Pie & tea\Relocated desktop\Power_CFG".
    However, the results were still "The system cannot find the path specified."

    Code:
    The system cannot find the path specified.
    
     ==============================================================================
     PowerCFG Detailed & Comprehensive Analysis Report.
     ==============================================================================
    
     Processing [ Creating the Power_CFG folder on the Desktop ] . . .
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
    The system cannot find the path specified.
     Processing COMPLETE.
    
    >Press ANY key to EXIT . . .

    No folder has been created on my desktop.
      My Computer


  6. Posts : 7,606
    Windows 10 Home 20H2
       #116

    @Paul Black
    Try putting quotation marks around the variable:

    rmdir /s /q %DT_Folder% >nul 2>&1 & mkdir %DT_Folder%

    A path containing spaces will be broken without quotation marks.
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #117

    Matthew Wai said:
    @Paul Black

    Try putting quotation marks around the variable:

    rmdir /s /q %DT_Folder% >nul 2>&1 & mkdir %DT_Folder%

    A path containing spaces will be broken without quotation marks.

    The file DOES have quotation marks.
      My Computer


  8. Posts : 7,606
    Windows 10 Home 20H2
       #118

    Does the following line have quotation marks?

    rmdir /s /q %DT_Folder% >nul 2>&1 & mkdir %DT_Folder%
      My Computer


  9. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
    Thread Starter
       #119

    Matthew Wai said:
    Does the following line have quotation marks?

    rmdir /s /q %DT_Folder% >nul 2>&1 & mkdir %DT_Folder%

    Yes.
      My Computer


  10. Posts : 7,606
    Windows 10 Home 20H2
       #120

    Sorry, where are the quotation marks? I cannot see them.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:31.
Find Us




Windows 10 Forums