Moving the 'My Documents' folder (and others) to a different hard disk

Page 6 of 10 FirstFirst ... 45678 ... LastLast

  1. Posts : 7,128
    Windows 10 Pro Insider
       #51

    If you used copy and paste to move your pictures they should still be in C:/Users/Username/Pictures.
      My Computers


  2. Posts : 4,172
    Windows 10 Pro x64 Latest RP
       #52

    Just one suggestion for anyone including a date in a filename, (at least for use on Windows), always use the YYYYMMDD format (Using Leading zeros when needed in the Month and Day segments).

    This will automatically fit in with the MS DOS sort algorithm, so there should never be any need to chop and change parts of the date to get things to sort properly.
      My Computers


  3. Posts : 11,352
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #53

    ArthurDent said:
    Can you remember, back in February when you introduced me to Robocopy, you mentioned that once you were happy that Robocopy was working as planned, you could run Robocopy without the Command Window showing and with an icon in the Notification Area.
    Art,

    If you mean when running it manually then you need to create a shortcut to the batch file and set its property dialog box to run minimised and you also choose an icon there.

    If it is run by Task scheduler then the procedure is given in my thread
    Make Task scheduler run a batch file minimised and with a specific icon - TenForums

    Denis
      My Computer


  4. Posts : 290
    Windows 10 Pro (x64) 21H1 (OS Build 19043.1165)
    Thread Starter
       #54

    Thanks Mate.



    It was the second one that I wanted but couldn't remember where it was.

    Art
      My Computers


  5. Posts : 11,352
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #55

    Paul Black said:
    Thanks @Denis for the detailed replies, links, and script [ I really like that ].
    Paul Black said:
    I just setup an OpenOffice Calc worksheet
    Paul,

    It's up to you what you do but I have some observations to make.

    1 When you are studying RoboCopy, study its /Log option. It is an alternative to your current > redirection to your own log. Both methods give more or less the same results; I also decided to use the > redirection method. Do bear in mind that you are not going to study those logs in the future, you are going to create them and only bother looking at them if there is a problem.

    2 I don't know what you mean by 'hierarchy' folders and I think it is a mistake to date-stamp folders anyway. It will lead to unecessary copies being made of files that have not changed since the last backup.

    3 About your date extraction code
    - I have never strung together two For commands on the same line.
    - I would have used a subroutine to extract the data of interest but if your repeated For works then fine.
    - I think it is a mistake to use the current time. I think you should use the Last modified date.
    - I think it is a mistake to string the date together as ddmmyyyy. That cannot be easily sorted, unlike yyyymmdd.

    4 I don't understand why you complicate the first two echo lines so much.

    5 I don't understand why you use >nul 2>&1 so much

    6 /MT:1 & /DCOPY:DAT should not give errors. You don't say what errors.

    7 goto :Exit is unnecessary

    8 It seems to me that your spreadsheet folder list could be replaced with a suitable For loop in the batch file together with a simple folder list in a separate text file [reading lists from text files is one of the things that For is good at].

    Denis
      My Computer


  6. Posts : 15,985
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #56

    Hello @Denis, thanks for your comments.

    Try3 said:
    1 When you are studying RoboCopy, study its /Log option. It is an alternative to your current > redirection to your own log. Both methods give more or less the same results; I also decided to use the > redirection method. Do bear in mind that you are not going to study those logs in the future, you are going to create them and only bother looking at them if there is a problem.
    I will look into the /Log option as that sound interesting.

    Try3 said:
    2 I don't know what you mean by 'hierarchy' folders and I think it is a mistake to date-stamp folders anyway. It will lead to unecessary copies being made of files that have not changed since the last backup.
    The main folder containing sub-folders. Probably a misleading use of the word on my part.

    Try3 said:
    3 About your date extraction code
    - I have never strung together two For commands on the same line.
    - I would have used a subroutine to extract the data of interest but if your repeated For works then fine.
    - I think it is a mistake to use the current time. I think you should use the Last modified date.
    - I think it is a mistake to string the date together as ddmmyyyy. That cannot be easily sorted, unlike yyyymmdd.
    I have often used two For commands on the same line and never had a problem with it. I only do this for relatively short cmd lines as long as they are completely visible in the text editor, otherwise I split them over two lines.

    Try3 said:
    4 I don't understand why you complicate the first two echo lines so much.
    The echo. & echo is purely aesthetic [ I could use two lines for it ] which obviously inserts a blank line first and then outputs text in the cmd console. It looks neater in the cmd console [ I have always had OCD ].

    Try3 said:
    5 I don't understand why you use >nul 2>&1 so much.
    Once I have tested the code and I am happy with the results shown in the cmd console, I use the >nul 2>&1 to hide the data output from the cmd appearing in the console when the script is run.

    Try3 said:
    6 /MT:1 & /DCOPY:DAT should not give errors. You don't say what errors.
    This is what the errors show . . .
    Code:
    ERROR : Invalid Parameter #5 : "/MT:1"
    ERROR : Invalid Parameter #5 : "/DCOPY:DAT"
    Try3 said:
    7 goto :Exit is unnecessary.
    OCD on my part.

    The idea of creating a folder with the date added to it was just in case a week down the line I accidentally deleted a file and it would therefore not get backed up on the current run. I would still have that file sitting in a previous backed up folder.

    OK, here is what I would like to do and my thinking . . .

    [1] My external drive that I am going to use for backup already has data on it.
    [2] I have not relocated my user folders to another drive like yourself.
    [3] I want to be able to backup data as and when I think it is needed, e.g. perhaps once a day, once a week, or several times a day.
    [3] If I delete a file by accident and do not realise it, I still want to be able to have a copy of it somewhere, like a previous backup run for example.
    [4] It would be nice to have a log of each backup run just in case there are problems.

    That is pretty much it really.

    How do you recommend that I approach this then please.

    Thanks in advance.
      My Computer


  7. Posts : 11,352
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #57

    Paul,

    To find out why those switches are not working, I suggest you do a straightforward test robocopy without any variables or other complications. Use a SourceFolder that contains some subfolders and a temporary folder as a test TargetFolder so you can clean it up easily afterwards.

    Perhaps something like this
    Code:
    RoboCopy "D:\Desktop\RoboCopy switches test\SourceFolder" "D:\Desktop\RoboCopy switches test\TargetFolder" /S /R:10 /MT:1 /DCOPY:DAT /XA:SH /MIR >"D:\Desktop\RoboCopy switches test\TestResults.Log"
    and then compare the initial block to that in your log when it goes wrong. I believe that the answer will be there.
    Code:
    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows
    -------------------------------------------------------------------------------
      Started : 11 July 2020 19:15:46
       Source : D:\Desktop\RoboCopy switches test\SourceFolder\
         Dest : D:\Desktop\RoboCopy switches test\TargetFolder\
        Files : *.*
      Options : *.* /S /E /DCOPY:DAT /COPY:DAT /PURGE /MIR /XA:SH /MT:1 /R:10 /W:30
    ------------------------------------------------------------------------------

    Denis
      My Computer


  8. Posts : 15,985
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #58

    Hello @Denis,

    Thanks, I will try that. As you were posting I was actually testing something very similar, so i will post the results anyway before trying your above recommendation.

    Code:
    @echo off
    
    Set "BackupDrive=F:"
    
    RoboCopy "%userprofile%\Working Directory\Batch" "%BackupDrive%\Batch" /S /R:10 /MT:1 /DCOPY:DAT /XA:SH /MIR
    
    echo ^>Press ANY key to EXIT . . . & pause >nul
    Here are the results . . .

    Code:
    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows
    
    -------------------------------------------------------------------------------
    
      Started : Sat Jul 11 19:34:53 2020
    
       Source - C:\Users\System-Admin\Working Directory\Batch\
         Dest - F:\Batch\
    
        Files :
      Options : /S /COPY:DAT /R:10 /W:30
    
    ------------------------------------------------------------------------------
    
    ERROR : Invalid Parameter #5 : "/MT:1"
    
           Simple Usage :: ROBOCOPY source destination /MIR
    
                 source :: Source Directory (drive:\path or \\server\share\path).
            destination :: Destination Dir  (drive:\path or \\server\share\path).
                   /MIR :: Mirror a complete directory tree.
    
        For more usage information run ROBOCOPY /?
    
    
    ****  /MIR can DELETE files as well as copy them !
      My Computer


  9. Posts : 11,352
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #59

    Paul,

    I have never seen that error. Try a test without /mt just to confirm that all the other options are shown in that header section correctly.

    I assume that you have no other problems
    - reading from C:\Users\System-Admin\Working Directory\Batch\
    - writing to F:\Batch

    Denis
      My Computer


  10. Posts : 15,985
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #60

    OK, I ran this from the cmd prompt . . .
    Code:
    RoboCopy "C:\Users\System-Admin\Working Directory\Source Folder" "F:\Target Folder" /S /R:10 /MT:1 /DCOPY:DAT /XA:SH /MIR > "%userprofile%\desktop\TestResults.Log"
    The results are . . .
    Code:
    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows                              
    -------------------------------------------------------------------------------
    
      Started : Sat Jul 11 19:57:49 2020
    
       Source - C:\Users\System-Admin\Working Directory\Source Folder\
         Dest - F:\Target Folder\
    
        Files : 
      Options : /S /COPY:DAT /R:10 /W:30 
    
    ------------------------------------------------------------------------------
    
    ERROR : Invalid Parameter #5 : "/MT:1"
    
           Simple Usage :: ROBOCOPY source destination /MIR
    
                 source :: Source Directory (drive:\path or \\server\share\path).
            destination :: Destination Dir  (drive:\path or \\server\share\path).
                   /MIR :: Mirror a complete directory tree.
    
        For more usage information run ROBOCOPY /?
    
                                                              
    ****  /MIR can DELETE files as well as copy 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 19:32.
Find Us




Windows 10 Forums