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. Batch file needed for USB write and read only.

    in Windows 10 Gaming
    Batch file needed for USB write and read only.: I have a requirement for a office purpose. I want to give a usb pendrive write protected and read only permission, for any system I connect, the data shoudnt get deleted anytime in the pendrive. So I know through dispart from cmd we can do this but can anyone help me to...
  3. Inaabilty to change date of Backup External HDD

    in Windows 10 Gaming
    Inaabilty to change date of Backup External HDD: I am Win 11 64 Bit fully updated. I operate 2-3 separate External HDD Drives which i use to back up new or changed files. I like to display the date to which they are backed up. e.g. New Seagate at 30 Oct 2024.Increasingly frequently when OI go to edit such date I get an...
  4. Inaabilty to change date of Backup External HDD

    in Windows 10 Software and Apps
    Inaabilty to change date of Backup External HDD: I am Win 11 64 Bit fully updated. I operate 2-3 separate External HDD Drives which i use to back up new or changed files. I like to display the date to which they are backed up. e.g. New Seagate at 30 Oct 2024.Increasingly frequently when OI go to edit such date I get an...
  5. 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?...
  6. 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
  7. 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...
  8. 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...
  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