Backup files Using Powershell

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 12

  • @GamingZone-dp4td
    @GamingZone-dp4td 6 месяцев назад

    Thank You for Video Brother.......❤

  • @daramulhern6301
    @daramulhern6301 5 лет назад +1

    Thanks, that was very clear and extremely useful.

  • @CustomNameHere
    @CustomNameHere 7 лет назад +2

    Question: What's the purpose of copying to a staging area THEN to the destination area? Why not directly to destination, saving on the amount of disk space required to perform the action.
    Secondly, just a suggestion, why not call the $'thefolder' $sourceFolder and the $backup folder $destinationFolder? And the -Recurse option means 'go down all subdirectories and perform the action'

    • @patricio120484
      @patricio120484 7 лет назад +2

      Sometime you need to create a temporal storage, you regroup files of differents location. This way can backup all file.

  • @farahalkubaisi7646
    @farahalkubaisi7646 6 лет назад

    Thank you! But I get the bellow error. can you help please? Copy-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory
    name must be less than 248 characters.
    At C:\Users\v-asabah\Desktop\LocalBackup.ps1:6 char:1
    + Copy-Item -Path $thefolder\* -Destination $staging -Recurse -Force

  • @subarnashrestha6128
    @subarnashrestha6128 6 лет назад

    great video, how do you delete the files and folders from the original destination? i tried remove-item- path but there was error.

    • @vigneshsp5604
      @vigneshsp5604  6 лет назад

      subarna shrestha what was the error?

    • @subarnashrestha6128
      @subarnashrestha6128 6 лет назад

      i figured out how to delete files from the original destination. can you teach me how can i write a script to back up certain amount of files and delete certain amount of files? thanks in advance. @@vigneshsp5604

    • @subarnashrestha6128
      @subarnashrestha6128 6 лет назад

      i figured out how to backup the files and how to delete the files from the original source, but i want to backup the files before today's date and delete the files from the source before today's date. can you help me with that ??

    • @vigneshsp5604
      @vigneshsp5604  6 лет назад

      @@subarnashrestha6128 You need to check the date attribute of files for this, google it, you will get to it :)

  • @emilianofernandez3703
    @emilianofernandez3703 7 лет назад

    is there a way to send files from a X PC to a remote Y PC?

    • @CustomNameHere
      @CustomNameHere 7 лет назад +2

      Yes there are several ways. The simplest is to ensure both PCs are in the same Windows Workgroup and your Windows user account is on both. Then use the fully qualified name (FQN) for the source and destination folders. For example, to copy from PC1\users\joe to PC2\temp you could use:
      Copy-Item \\PC1\users\joe\* \\PC2\temp -Recurse -Force
      There are several other ways but use Google to find your answer.