-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBacking_Up_Files.ps1
More file actions
25 lines (17 loc) · 959 Bytes
/
Backing_Up_Files.ps1
File metadata and controls
25 lines (17 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
###########################
# author #
# Carlo Gimps #
# #
###########################
#if something error occured
$ErrorActionPreference = "Stop"
######Setting Variables here
$thefolder = "C:\iphone" # create new folder name and paste setup location in this case nasa drive C sya
#$staging = "C:\Users\c\Desktop\staging" #create another folder that stores in desktop path in this code i name the folder to staging
$backup = "D:\backup" # this destination can be used in network maping if u have NAS, but i used external drive to store all backup files
#Actual Logic
Copy-Item -Path $theFolder\* -Destination $backup -Recurse -Force
#Remove-Item $backup\* -Recurse -Force
#Copy-Item -Path $theFolder\* -Destination $staging -Recurse -Force
#Copy-Item -Path $staging\* -Destination $backup -Recurse -Force
#Remove-Item $staging\* -Recurse -Force