New Laptop - empty m.2 socket - doesn'r recognise SSD

Page 4 of 5 FirstFirst ... 2345 LastLast
  1. ArthurDent's Avatar
    Posts : 215
    Windows 10 Pro (x64) 20H2 (OS Build 19042.630)
    Thread Starter
       #31

    Hi Denis

    Yep - rather painless.

    Quite slow on my main laptop - but then it was copying around 210+ GB.

    I left Multi-thread set at 1. I may try other values in future - such as 2, 4, 8, 16 etc and see what the SD card will cope with.

    One other interesting thing. Using 'Computer' then navigating to 'C: > Users > AD' there are several folders named 'My Music', 'My Pictures' and 'My Videos' which I wanted to backup.

    However entering this path C:\Users\AD\My Music'threw up Error 2 "Can't find specified folder".

    This had me puzzled as I was sure I had the path correct as given by Windows Explorer - until I navigated to the 'My Music' folder for example, right-clicking on it, selecting 'properties' and clicking on the 'Location' tab.

    The path was given as 'C:\Users\AD\Music' and not 'C:\Users\AD\My Music' as Windows Explorer had it.

    Changing the Robocopy command to the following, sorted the problem.
    Robocopy "C:\Users\AD\Music" "%BackupDrive%\My Music" /S /R:10 /MT:1 /DCOPY:DAT /XA:SH /MIR

    Note that the above is what I discovered in Windows 7 but is probably applicable to Windows 10.

    Hope this helps,

    Art
    Last edited by ArthurDent; 02 Mar 2020 at 06:07.
      My Computers

  2. Try3's Avatar
    Posts : 7,379
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #32

    One other interesting thing. Using 'Computer' then navigating to 'C: > Users > AD' there are several folders named 'My Music', 'My Pictures' and 'My Videos' which I wanted to backup.
    However entering this path C:\Users\AD\My Music'threw up Error 2 "Can't find specified folder".
    Art,

    I suggest that you turn off File explorer options to show hidden & system files.
    [File explorer, View menu, Options, View tab - choose Don't show hidden & a few lines down set the checkbox for Hide protected OS files]
    - I'm quite rusty about the weird, unopenable folders within C:\Users\%UserName% because I relocated all my own user folders to my D:\ drive a decade ago so I hardly ever look in there.
    - I can recall things that were named as though they were music folders etc but were not folders at all. They were 'junction points' created to redirect older applications to the right place. I thought these juntion points had different icons so they would not get confused with real folders but, as I say, I am rusty.

    For each of the Music & My music etc that apepar when hidden-system are off, I suggest checking that it is a folder icon then opening that folder to see if it is a real folder that lets you look at it and also right-clicking on the folder & selecting Properties to see whether or not it has a Location tab.
    - If it lets you look at it but has no Location tab then you can move whetever is in it then delete it.
    - If it lets you look at it and it has a Location tab then it is one of your user folders and you must not delete it.

    Do note one other thing. Even if a folder is called My music, if you open the folder by going down the route C:\Users\%UserName%\My music then click on the File explorer address bar it will probably show you that the real path to that folder is just C:\Users\%UserName%\Music.
    - I think there were cases where you could use either path in commands such as RoboCopy and it would work. But, as I say, I'm rusty.

    Denis
      My Computer

  3. ArthurDent's Avatar
    Posts : 215
    Windows 10 Pro (x64) 20H2 (OS Build 19042.630)
    Thread Starter
       #33

    Hi Denis,

    Yes, the inner workings of Windows are a mystery.

    What most folks don't realise is that in Windows 10 'under the hood', there is still DOS (6.22 I think or possibly DOS 7) beavering away in the background. All to keep compatability with previous versions of the OS. Indeed, as far as the OS is concerned it still thinks it only has around 32Kb of RAM!! It is truly amazing that these PCs work at all. Talk about plate-spinning!

    The Robocopy command C:\Users\%UserName%\Music did indeed copy across the contents of the My Music "folder".

    Anyhoo, I hope this additional info on Robocopy helps. The last dozen or so posts in this thread really should have had their own thread I guess.

    Regards

    Art
    Last edited by ArthurDent; 02 Mar 2020 at 06:06.
      My Computers

  4. Caledon Ken's Avatar
    Posts : 24,152
    Windows 10 Pro x64 Version 2004
       #34

    When I use Robocopy I add the switch /xj to each copy line to ensure junction points are not followed
      My Computer

  5. Bree's Avatar
    Posts : 18,607
    10 Home x64 (20H2) (10 Pro on 2nd pc)
       #35

    Caledon Ken said:
    When I use Robocopy I add the switch /xj to each copy line to ensure junction points are not followed
    +1 on that recommendation. The first time I used Robocopy as an administrator to back up my user folder it followed the junction points round and round in circles, creating multiple nested 'My Documents' folders on the destination until it errored out by exceeded the permitted path length.

    I see the /r:n option has been used. That one caught me out too, the default retry count is one million and the default wait between retries is 30 seconds. That adds up to nearly a year of retries should they all fail.
      My Computers

  6. Caledon Ken's Avatar
    Posts : 24,152
    Windows 10 Pro x64 Version 2004
       #36

    Yes and when I run multiple commands I look at the error level of each line and GOTO an error screen should a command line fail.
      My Computer

  7. Try3's Avatar
    Posts : 7,379
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #37

    Caledon Ken said:
    Yes and when I run multiple commands I look at the error level of each line and GOTO an error screen should a command line fail.
    Ken,

    In my backing up & inter-computer syncing batch files, if there is a RoboCopy errorlevel bigger than 3 [which are the only RoboCopy errors to bother about because lower values do not necessarily indicate an error]
    - I repeat the command up to [currently] 5 times before enabling an error screen. I only need it to pass once to allow the rest of the procedure to continue as normal.
    - At each loop, I halve the number of threads in use [starting from 32, so the last one is /MT:1 & if I increase my maximum number of loops it would stay at 1]. The only time I have ever encountered RoboCopy errors in practice has been because a target was limited in its capabilities & reduced numbers of threads have avoided errors altogether.
    - Only if that individual RoboCopy command fails at its the final attempt do I increment an overall error level & set a variable that identifies the section that failed.
    - I avoid individual error reporting and, instead, rely on reporting of errors once at the very end of the procedure. The error dialog identifies all the sections that failed. Some of my RoboCopy-based batch files have 21 sections so I would not want to delay / avoid later sections for a fault that was confined to a single section.

    Denis



    Art,

    I never mentioned anything about error checking to you because I was keen to get you using RoboCopy instead of discussing sophistications such as error checking**.
    - Once I have a script working correctly, it only causes errors if the destination is not available or I overwhelm it by trying to use too many threads***.
    - Now that you have your batch file working I do not believe you will encounter any errors except when you experiment with increasing the number of threads. And I think you will be better off just changing the number of threads by editing the original batch file & just trying the new number instead of using the overly enthusiatsic method I have employed.

    ** My biggest RoboCopy-based batch file has 635 lines and to report errors onscreen at the end it calls up a PowerShell script containing 654 lines.

    *** My only real headaches have been an awkward SD card & mirroring my folders across my network to an awkward secondary computer [a tablet that uses SD cards & USB sticks for my own files instead of hard drives / SSDs].


    Denis
      My Computer

  8. Caledon Ken's Avatar
    Posts : 24,152
    Windows 10 Pro x64 Version 2004
       #38

    Very neat Denis.

    My script is very simple.

    Copy desktop
    Copy documents
    Copy Pictures
    etc

    I leave it a one thread, once the initial copy is done there is just the maintenance.


    Wouldn't mind see one of those sophisticated scripts. Bet there is a ton to learn from within.
      My Computer

  9. Try3's Avatar
    Posts : 7,379
    Windows 10 Home x64 Version 20H2 Build 19042.868
       #39

    Ken,

    OK. Here's my CustomMsgBox as an example. It is a template for a common subroutine in almost all my scripts. I felt too limited by VBS standard dialogs - MsgBox, InputBox, PopUpBox.
    The Demo is an innocuous demonstrator and does not change anything outside of itself. All it does is echo the number of the button you clicked in the dialog box.
    Demo.zip
    New Laptop - empty m.2 socket - doesn'r recognise SSD-pscustommsgbox-sample.png
    You can have up to 10 lines of prompt and up to 5 command buttons.

    New Laptop - empty m.2 socket - doesn'r recognise SSD-robosync-opening-custommsgbox-dialog.png
    A real example of a dialog initiated by my batch file caller to run the same PS & VBS files.
    This dialog appears when my inter-computer syncing is triggered by Tasks scheduler [using RoboCopy -hence my title RoboSync].
    The dialog allows me to choose whether to proceed with RoboSync or to stop it because it is not convenient at that moment. The background is blue to indicate an information dialog.


    New Laptop - empty m.2 socket - doesn'r recognise SSD-another-custommsgbox-dialog.png
    A real example of a dialog initiated by my batch file caller to run the same PS & VBS files.
    This dialog appears when an ad-hoc inter-computer syncing tool is run [manually, idiotically] but it discovers that there are no network computers. The background is yellow to indicate a warning.


    New Laptop - empty m.2 socket - doesn'r recognise SSD-vba-called-example.png
    A real example of a dialog iniitiated by my VBA caller to run the same PS & VBS files. These dialogs are called up whenever I close chosen Excel, Access & Word files. The background is green to indicate that a decision needs to be made.

    If you want me to, I can add a decent explanation so you can then play around with the various values to see how it can easily be tweaked for different needs.
    - I just tried explaining all the different bits properly for this post but it just takes so long. I'll have another look tomorrow.
    - The batch file calls the PS file and passes arguments to it
    - The PS file displays the CustomMsgBox itself and uses a small vbs file to announce a voice prompt
    - The text you see in the dialog, its colour scheme, its icon, the announcement, the time it remains onscreen are all set in the batch file. Only the batch file is customised for each use - the PS file & the VBS file do not get changed.
    - The PS file reports back to the batch file which button was clicked.

    The bits you can change around are within the batch file sections
    :::::::::: NotnType - Announce, icon, colours ::::::::::
    :::::::::: Form definition and contents ::::::::::
    The locations of the icons will not be valid for your computer. It's a minor part of the script but I've attached some samples that you can point to instead [these freeware icons are from Sekkyumu at Developpers Iconset (105 icons) | Sekkyumu]
    BallIcons.zip

    And another thing, ...
    - I have an equivalent VBA caller so the same PS file & VBS file get used whenever I want to call the CustomMsgBox from. The use of ini files to pass arguments around was required to allow me to use my VBA caller with the same PS & VBS.
    - Do note that you will need to set your PS policy so it can run scripts - Change PowerShell Script Execution Policy - TenForumsTutorials

    You need to make one change to the PS manually because I have not finished off my last enhancement of using a VBS file to run the voice prompt in parallel with the dialog box opening.
    - In the PS file [which is most easily opened in Notepad], find the section #################### Announce the dialog ####################
    - Change the line
    Code:
    Start-process C:\Windows\System32\wscript.exe "C:\Tools\MsgBoxes\PSCustomMsgBox.vbs $Announce"
    to refer to the folder you have put the three files in - i.e. replace C:\Tools\MsgBoxes.

    While you are playing with this demonstrator, please read my opinion of suitable permanent locations for such scripts - see the annex of my article Make Task scheduler run a batch file minimised and with a specific icon - TenForums

    Denis
    Last edited by Try3; 03 Mar 2020 at 20:19.
      My Computer

  10. Caledon Ken's Avatar
    Posts : 24,152
    Windows 10 Pro x64 Version 2004
       #40

    I'll have a look. Initially I can see you are pretty advanced at writing scripts.
      My Computer


 
Page 4 of 5 FirstFirst ... 2345 LastLast

  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 14:30.
Find Us




Windows 10 Forums