반응형 PowerShell1 PowerShell 스크립트로 자동 백업하기 특정 디렉토리의 파일을 압축하여 지정된 경로에 저장하는 기능을 수행할 PowerShell 스크립트를 만들어주었습니다. 전체 코드는 아래와 같습니다.# 압축할 파일의 앞자리 명칭$fileName_prefix= 'backup_liyo'# 압축할 폴더 경로$dirPath = 'D:\liyoFTP'# 압축한 파일이 저장될 경로$destinationPath= 'E:\backupLiyoFTP'# =================================# ### 구현 부분 ###$dirYear = Get-Date -format "yyyy"$dirMonth = Get-Date -format "MM"$dt = Get-Date -format "yyyyMMdd_HHmmss"$createPath = $destination.. 2025. 1. 15. 이전 1 다음 반응형