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. Windows 10 "last backup date"

    in AntiVirus, Firewalls and System Security
    Windows 10 "last backup date": Windows 10 Pro Version 1803. I use Windows 10 Backup set to daily backups. The last backup date never increments. Images shows today's dates on my machine. BTW, I only want to know why this is, I don't need advice on how to run backups etc. Many thanks and Happy New...
  3. 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
  4. Write a batch script to read list of db names to connect

    in Windows 10 Installation and Upgrade
    Write a batch script to read list of db names to connect: Hi, I hope someone can help me. I am new to batch scripting. I want to read a file that has database names and connect to each of them to get status. I'd like to do this from cmd command. I really appreciate if I can get some help here. Thanks in advance....
  5. Change date format

    in Windows 10 Customization
    Change date format: how do i change date format to mm/dd/yyy. currently it shows dd/mm/yyyy. https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/change-date-format/369e7554-8e46-40f7-b522-b8c0a3b672ef
  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...