Windows 10: Batch backup & change write date

Discus and support Batch backup & change write date in Windows 10 Support to solve the problem; I use a batch file to back up a directory, updating the same directory each week for a month. I then rename it to include the date "Allback180822" and... Discussion in 'Windows 10 Support' started by tcebob, Jan 2, 2019.

  1. tcebob Win User

    Batch backup & change write date


    I use a batch file to back up a directory, updating the same directory each week for a month. I then rename it to include the date "Allback180822" and archive it.
    Code: REM Backup of C:\All to Z:\Allbak xcopy C:\all\* Z:\Allbak\* /C /D /E /I /Y echo Done! cmd /k ::keep window open[/quote] Works fine but the file attribute Write Date does not update. I tried the Access attribute but it's too inclusive; even looking at the file changes that. How can I change the attribute within the batch file?

    :)
     
    tcebob, Jan 2, 2019
    #1

  2. Batch: change target directory date after xcopy


    If you don't mind installing something, touch.exe is part of Cygwin coreutils.


    Batch backup & change write date [​IMG]


    Otherwise, if you can move to PowerShell then you can also do:

    (Get-Item -Path $folder).LastWriteTime = (Get-Date)


    Batch backup & change write date [​IMG]


    Edit: You can also call the PowerShell command from CMD like:
    Code:
    Code:
    powershell -Command "(Get-Item -Path c:\temp).LastWriteTime = (Get-Date)"
     
    PolarNettles, Jan 2, 2019
    #2
  3. Date and Time Year is 3015 and can't change to 2015.

    Hi Anthony,

    Thank you for posting your query on Microsoft Community.

    I understand your inconvenience. We will assist you to resolve this issue.

    I suggest you to set “Windows Time” service as manual. Follow the steps provided below.

    • Press Windows logo Key + R key.
    • Type services.msc
    • Right click on Windows Time service.
    • Select Properties.
    • Under startup type drop down, change it to manual.
    • Click on Apply button and OK button.

    Restart your computer and try to change the date and time and check.

    To change the date and time, follow the steps provided below.

    • Go to Date and time settings.
    • First, turn of the set time automatic.
    • Then Click on Change button, under Change date and time.
    • Now set the date and time, and then restart the computer and check.


    Hope this information is helpful. For any further query, feel free to contact us.

    Thank you.
     
    Syed Md Bilal, Jan 2, 2019
    #3
  4. Batch backup & change write date

    Writing batch files

    I haven't done any coding for a very long time and I am looking for a tutorial and command list for making a batch file in win10. All I can seem to find are videos or sites that tell you that you use notepad to save a file as a .bat with virtually no info
    on the actual programming/scripting. I know it'll all come back to me once I do one or two basic files, but I need a detailed refresher. Any suggestions?

    (Specifically, I need a program to replace lines in one text file with lines from a different text file.)
     
    CosmicCowboy, Jan 2, 2019
    #4
Thema:

Batch backup & change write date

Loading...
  1. Batch backup & change write date - Similar Threads - Batch backup change

  2. Is it Possible to Batch Change Date & Time of File

    in Windows 10 Ask Insider
    Is it Possible to Batch Change Date & Time of File: [ATTACH] I have about 10,000 or so files that are either .mp4 or .jpg that all say they were created on the same day. I have all the timestamps in the filename in [year,month,day_hour,min,second.jpg/mp4] format. How can I transfer the date in the filename to metadata?...
  3. Batch file to current date and time

    in Windows 10 Customization
    Batch file to current date and time: Dear expert. Can you help me to batch file to change system date and time to current? Best regards, https://answers.microsoft.com/en-us/windows/forum/all/batch-file-to-current-date-and-time/2c75b187-3561-4604-b9b5-218db993a6f6
  4. The Last backup date is not updated

    in Windows 10 Installation and Upgrade
    The Last backup date is not updated: The Backup and Restore (Window 7) works well before. Recently the Last backup date stopped at 4/8/2019, even though the backup has performed after that day. I set the backup schedule at Every day. The Next backup date is updated. I think it is not related to incorrect date...
  5. Change date/

    in Windows 10 Support
    Change date/: Hi, ever since I updated to the latest version of Windows 10 my date has been mixed up. I'm in Australia so we have day, month then year. but at the moment it's saying month,day, year. how do I change this? thanks :) 122000
  6. Help needed writing batch script!

    in Windows 10 Support
    Help needed writing batch script!: Firstly thank you for even clicking on this thread as I understand that this probably isn't meant to be here. The scenario is that I'm trying to write a script that incorporates the result of a ping to an IP and then based on the result do different things. Here is an...
  7. Enable Or Disable Change System Time And Date Using Batch file

    in User Accounts and Family Safety
    Enable Or Disable Change System Time And Date Using Batch file: hi, i want to disable the change time and date in windows ten using batch file, i am using this script to show and hide hidden file Code: @echo off REG ADD "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /V Hidden /T REG_DWORD /D 0 /F taskkill /f /im...
  8. Windows 10 backup using a batch file

    in Windows 10 Backup and Restore
    Windows 10 backup using a batch file: Hello I hope someone can help. We use a script which runs a batch file to backup laptops at the company I work at. To get it to work in Windows 7 we just add the user to the backup operators group. We have just started a few people with Windows 10. Set them up in the same...
  9. Batch: change target directory date after xcopy

    in Windows 10 Backup and Restore
    Batch: change target directory date after xcopy: I use this command to make a weekly back up my personal files: Code: xcopy C:\all\* Z:\Allbak\* /C /D /E /I /W /Y[/quote] Works fine but how can I change the date attribute of the Allbak directory to the current date? 102611
  10. Include date in file created by batch file.

    in Windows 10 Support
    Include date in file created by batch file.: How can I add to this batch command to include the date: xcopy C:\all\* Z:\Allbak\* /E /Y /C I'd like the resulting file to be named "Z:\Allbak171129" (yr mo day). The plan is to set up a task schedule to run the batch file every week. I want to keep several previous...

Users found this page by searching for:

  1. last backup