Skip to content

Instantly share code, notes, and snippets.

@kujirahand
Created June 4, 2022 08:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kujirahand/0ed05dd585ab377ee5b33b357be0f08f to your computer and use it in GitHub Desktop.
Power AutomateでデスクトップにあるExcelファイルをOneDriveにバックアップする
# 以下のテキストをコピーして、Power Automateに貼り付けてください。
# -----------------------------------------------------
# 1時間に1回、ファイルをOneDriveにバックアップします。
LOOP WHILE (1) = (1)
# ☆TODO: 以下のコピー元を指定してください
Folder.GetFiles Folder: $'''C:\\Users\\kujirahand\\Desktop''' FileFilter: $'''*.xlsx''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
LOOP FOREACH CurrentItem IN Files
# ☆TODO: 以下のコピー先にOneDriveを指定してください
File.Copy Files: CurrentItem Destination: $'''C:\\Users\\kujirahand\\OneDrive''' IfFileExists: File.IfExists.Overwrite CopiedFiles=> CopiedFiles
END
WAIT 60 * 60
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment