Flow / Power Automate - SharePoint: Automate File Movement to an Archive Library Video

Learn to automate file movement in a SharePoint archive library using variables, conditional elements, and Power FX functions. Imagine maintaining source folder structure in the target library. Set up a recurring flow to retrieve and process files, and recreate the original structure in the archive library. This tutorial provides a comprehensive guide for efficient archiving between SharePoint libraries!

  • 05:20
  • 209 views

Objectifs :

This tutorial aims to teach you how to automate the movement of files in a SharePoint archive library, taking into account various constraints. You will learn to use variables, conditional elements, and Power FX functions to create a recurring flow that organizes files based on their age while maintaining the original folder structure.


Chapitres :

  1. Introduction to File Automation
    Welcome to this tutorial where you will learn to automate the movement of files in an archive library. This process involves a more complex flow that must consider a series of constraints.
  2. Understanding the Task
    In this video, you will use variables, conditional elements, and Power FX functions. Imagine needing to move files from a folder in a SharePoint library based on their age. The goal is to move these files while maintaining the source folder and file structure, ensuring an identical organization of your content in the target library, which is your archive library.
  3. Setting Up Your SharePoint Libraries
    In this SharePoint site, you will find a standard library named 'Documents' containing a folder titled 'Files to Move.' This folder has a series of files of varying ages. Optionally, you can add a column for the file creation or modification date, which isn’t shown by default. Your second library, named 'Archives,' is currently empty and will need to be automatically populated.
  4. Creating a Recurring Flow
    To begin, you will initiate a recurring flow that runs on the first of each month at 6 a.m. The first action will be to retrieve files from the folder containing potential files to be moved. While you could process the entire contents of your document library, this tutorial will focus on a specific folder.
  5. Configuring Advanced Settings
    Enable advanced settings to apply a query that limits the flow to the chosen folder, including files in the subfolders. Enter the parameters related to nested items and specify the folder to be processed. In this example, you will only move files created two years ago or more.
  6. Setting Filter Criteria
    The filter query will specify this criterion. Enter the name of the created column for the file creation date. You can also use 'modified' for the date of the last modification of the file. Set your criterion to 'le' (less than or equal) and enter an apostrophe to reference your deadline relative to the file creation date.
  7. Using Power FX Functions
    Use the Power FX button to enter a formula that references the current date (UTC now) associated with the 'A day' function, defining minus 730 days (about two years). This will allow you to subtract 730 days from the current date.
  8. Processing Files
    When SharePoint lists the files, it will include the names of the subfolders. To recreate the original structure in your archive library, constrain this action by adding a query parameter that excludes folder-type objects from the result. Initialize a text variable named 'folder' and populate it during future processing.
  9. Looping Through Files
    Files dated over two years will be listed. Begin their processing by initializing an 'Apply to Each' loop that retrieves the dynamic content body value, which is the list of items to process. Within the loop, populate your 'folder' variable by retrieving the access path of each file.
  10. Managing File Paths
    Choose the action related to variables to set your 'folder' variable. The access path of the file to be moved will contain the name of the library 'Shared Documents' and the subfolder 'Files to Move.' Use a Power FX formula to replace this path with empty space in your variable to retrieve only the relative path inside the folder to be processed.
  11. Handling Folder Structure
    The last character of your 'folder' variable will contain a slash, which will cause an issue when moving the file to be archived. Use the 'slice' function to retrieve the path string from position index zero to index minus one, corresponding to the slash to be removed. If the file is at the root of your 'Files to Move' folder, the variable will contain empty space; otherwise, it will contain the path of the folder where the file is placed.
  12. Creating Folders in SharePoint
    Manage an 'if' condition to test if the 'folder' variable is empty. If so, add the SharePoint action to create folders in your SharePoint site within your archives library, using the relative path of the folder corresponding to the file being processed.
  13. Moving Files to Archive
    After creating or not creating the folder, still within the loop, add the action to move the processed file. Refer to the file to be moved by its complete original path and set the destination folder corresponding to your archives library, followed by the path stored in your variable. If another file already exists, choose to replace it.
  14. Conclusion
    Finally, save and test your flow. Files over two years old will be moved to the root of your archives library, and for files stored in subfolders, the original structure will be recreated. This is how to create a complete archiving flow between SharePoint libraries.

FAQ :

What is the purpose of automating file movement in SharePoint?

Automating file movement in SharePoint helps maintain organization, ensures timely archiving of old files, and reduces manual effort in managing file storage.

How do I set up a recurring flow in Power Automate?

To set up a recurring flow in Power Automate, you can use the 'Recurrence' trigger, specify the frequency (e.g., monthly), and set the time for the flow to run.

What are Power FX functions?

Power FX functions are formulas used in Microsoft Power Platform to perform calculations, manipulate data, and automate tasks within applications.

How can I filter files based on their creation date in SharePoint?

You can filter files based on their creation date by using a filter query in your flow that specifies the date criteria, such as files created two years ago or more.

What should I do if a file already exists in the destination folder?

If a file already exists in the destination folder, you can choose to replace it during the file movement process in your flow.


Quelques cas d'usages :

Automating Document Archiving

In a corporate environment, a company can automate the archiving of old project files from a SharePoint library to an archive library. By setting up a flow that runs monthly, the company ensures that all files older than two years are moved, maintaining the original folder structure, which helps in easy retrieval of archived documents.

Managing Compliance Records

A legal firm can use this automated flow to manage compliance records by moving files that are no longer active to an archive library. This helps in keeping the active library clutter-free while ensuring that all compliance documents are stored securely and can be accessed if needed.

Streamlining File Organization

An educational institution can implement this flow to regularly archive student records and course materials that are no longer in use. By automating the process, the institution can ensure that their document library remains organized and that important historical data is preserved in an accessible manner.


Glossaire :

SharePoint

A web-based collaboration platform developed by Microsoft that integrates with Microsoft Office. It is used for storing, organizing, sharing, and accessing information from any device.

Power FX

A low-code programming language used in Microsoft Power Platform to create custom business logic and automate processes.

Flow

A feature in Microsoft Power Automate that allows users to automate workflows between applications and services.

UTC

Coordinated Universal Time, a time standard that is the basis for civil timekeeping worldwide.

Variable

A storage location identified by a name that can hold data which may change during the execution of a program.

Loop

A programming construct that repeats a block of code as long as a specified condition is true.

If Condition

A conditional statement that executes a block of code if a specified condition is true.

Folder Structure

The organization of folders and subfolders within a file system, which helps in managing and locating files.

Filter Query

A set of criteria used to limit the data retrieved from a database or service based on specific conditions.

00:00:05
automate the movement of files in an archive library.
00:00:09
This more complex flow will have to take into account a series of constraints.
00:00:14
In this video, you will use variables, conditional elements and power FX functions
00:00:21
to start
00:00:22
imagine that you need to move files from a folder in a sharepoint library.
00:00:26
Depending on the age of the files,
00:00:28
you will need to move them while maintaining the source folder and file structure
00:00:32
to keep an identical organization of your content in the target library.
00:00:36
That is your archive library. In
00:00:39
this sharepoint site,
00:00:40
you will find a standard library named documents in
00:00:43
which there is a folder titled files to move
00:00:47
this folder contains a series of files of varying ages.
00:00:51
You can optionally add a column for the file
00:00:53
creation or modification date which isn't shown by default.
00:00:58
Your second library named archives is currently completely
00:01:02
empty and will need to be automatically populated
00:01:06
to begin.
00:01:07
You will initiate a recurring flow that will run on the first of each month at 6 a.m.
00:01:19
The first action will be to retrieve
00:01:21
the files from the folder containing the potential
00:01:23
files to be moved while you could process
00:01:26
the entire contents of your document library.
00:01:28
In this tutorial, we will limit ourselves voluntarily to a specific folder.
00:01:34
Enable advanced settings to apply a query that will limit the flow to the
00:01:37
chosen folder while including the files in the sub folders of the targeted folder.
00:01:43
Then enter the parameters related to nested items
00:01:46
and specify the folder to be processed.
00:01:48
In
00:01:49
this example, we will only move files created two years ago or more.
00:01:54
The filter query will specify this criterion.
00:01:57
Enter the name of the created column for the file creation date.
00:02:01
You can also use modified for the date of last modification of the file.
00:02:06
Then set your criterion to le meaning less or equal.
00:02:11
You will then enter an apostrophe to reference
00:02:13
your deadline relative to the file creation date.
00:02:17
Use the power FX button and enter the
00:02:20
following formula which allows referencing the current date UTC
00:02:24
now associated with the A day function by defining minus 730 days or about two years.
00:02:32
Concretely. In this example, you will subtract 730 days from the current date.
00:02:39
When SharePoint lists the files, it will include the names of the sub folders.
00:02:43
In the result,
00:02:44
you will need to constrain this action by adding
00:02:46
a query parameter excluding folder type objects from the result
00:02:52
to recreate the original structure in your archive library, initialize a text,
00:02:57
variable named folder and populate it during future processing
00:03:02
the files dated over two years are listed,
00:03:05
begin their processing by initializing a apply to each
00:03:08
loop that will retrieve the dynamic content body value,
00:03:12
which is the list of items to process.
00:03:15
Always within the loop. Populate your folder.
00:03:18
Variable by retrieving the access path of each file.
00:03:21
Choose the action related to variables to set your folder. Variable.
00:03:27
Note several technical elements here,
00:03:30
the access path of the file to be moved
00:03:32
will contain the name of the library shared documents
00:03:35
as well as the sub folder files to move,
00:03:39
use a power FX formula to replace this path with empty space in your
00:03:43
variable to retrieve only the relative path inside the folder to be processed.
00:03:51
Another important point,
00:03:52
the last character of your folder variable will contain a slash which
00:03:57
will cause an issue when moving the file to be archived.
00:04:00
Use the slice function to retrieve the path string from position index
00:04:04
zero to index minus one corresponding to the slash to be removed.
00:04:10
If the file is at the root of your files to move folder,
00:04:13
the variable will contain empty space.
00:04:16
Otherwise it will contain the path of the folder where the file is placed.
00:04:21
Manage an if condition testing if the folder variable is empty.
00:04:27
If so add the SharePoint action to create folders to
00:04:31
create in your SharePoint site within your archives library.
00:04:35
The relative path of the folder corresponding to the file being processed
00:04:41
after creating or not the folder still within the loop.
00:04:44
Add the action to move the processed file,
00:04:46
refer to the file to be moved by its complete original path and set the
00:04:50
destination folder corresponding to your archives library followed
00:04:55
by the path stored in your variable.
00:04:57
If another file already exists, choose to replace it,
00:05:01
finally save and test
00:05:05
files over two years old will be moved to the root of your archives library
00:05:09
for files stored in sub folders. The original structure will be recreated.
00:05:14
This is how to create a complete archiving flow between sharepoint libraries.

No elements match your search in this video....
Do another search or back to content !

 

00:00:03
Bem-vindo a este tutorial onde irá aprender a
00:00:05
automatizar a movimentação de ficheiros numa biblioteca de arquivos.
00:00:09
Este fluxo mais complexo terá de ter em conta uma série de constrangimentos.
00:00:14
Neste vídeo, irá usar variáveis, elementos condicionais e funções Power FX
00:00:21
iniciar
00:00:22
imagine que precisa de mover ficheiros de uma pasta numa biblioteca do sharepoint.
00:00:26
Dependendo da idade dos ficheiros,
00:00:28
terá de os mover enquanto mantém a pasta de origem e a estrutura do ficheiro
00:00:32
para manter uma organização idêntica do seu conteúdo na biblioteca de destino.
00:00:36
Essa é a sua biblioteca de arquivos. Em
00:00:39
este site do sharepoint,
00:00:40
encontrará uma biblioteca standard denominada documentos em
00:00:43
que existe uma pasta intitulada ficheiros para mover
00:00:47
esta pasta contém uma série de ficheiros de idades variadas.
00:00:51
Opcionalmente, pode adicionar uma coluna para o ficheiro
00:00:53
data de criação ou modificação que não é mostrada por defeito.
00:00:58
A sua segunda biblioteca com o nome de arquivos está atualmente completamente
00:01:02
vazio e terá de ser preenchido automaticamente
00:01:06
para começar.
00:01:07
Irá iniciar um fluxo recorrente que decorrerá no primeiro dia de cada mês às 6 horas da manhã.
00:01:19
A primeira ação será recuperar
00:01:21
os ficheiros da pasta que contém o potencial
00:01:23
ficheiros a mover enquanto pode processar
00:01:26
todo o conteúdo da sua biblioteca de documentos.
00:01:28
Neste tutorial, limitar-nos-emos voluntariamente a uma pasta específica.
00:01:34
Activar definições avançadas para aplicar uma consulta que limita o fluxo ao
00:01:37
pasta escolhida enquanto inclui os ficheiros nas subpastas da pasta de destino.
00:01:43
Em seguida, introduza os parâmetros relacionados com os itens aninhados
00:01:46
e especifique a pasta a ser processada.
00:01:48
Em
00:01:49
neste exemplo, apenas moveremos ficheiros criados há dois anos ou mais.
00:01:54
A consulta do filtro especificará este critério.
00:01:57
Introduza o nome da coluna criada para a data de criação do ficheiro.
00:02:01
Também pode utilizar modificado para a data da última modificação do ficheiro.
00:02:06
Em seguida, defina o seu critério para le meaning menor ou igual.
00:02:11
Irá então introduzir um apóstrof para referência
00:02:13
o seu prazo relativo à data de criação do ficheiro.
00:02:17
Utilize o botão liga/desliga FX e introduza o
00:02:20
seguinte fórmula que permite fazer referência à data atual UTC
00:02:24
agora associada à função Dia A definindo menos 730 dias ou cerca de dois anos.
00:02:32
Concretamente. Neste exemplo, irá subtrair 730 dias da data atual.
00:02:39
Quando o SharePoint lista os ficheiros, incluirá os nomes das subpastas.
00:02:43
No resultado,
00:02:44
terá de restringir esta acção adicionando
00:02:46
um parâmetro de consulta excluindo objetos do tipo pasta do resultado
00:02:52
para recriar a estrutura original na sua biblioteca de arquivos, inicializar um texto,
00:02:57
variável nomeada pasta e preenchê-la durante o processamento futuro
00:03:02
os ficheiros com data superior a dois anos são enumerados,
00:03:05
iniciar o seu processamento inicializando uma aplicação a cada
00:03:08
loop que irá recuperar o valor do corpo do conteúdo dinâmico,
00:03:12
que é a lista de itens a processar.
00:03:15
Sempre dentro do ciclo. Preencha a sua pasta.
00:03:18
Variável recuperando o caminho de acesso de cada ficheiro.
00:03:21
Escolha a ação relacionada com variáveis para definir a sua pasta. Variável.
00:03:27
Note aqui vários elementos técnicos,
00:03:30
o caminho de acesso do ficheiro a mover
00:03:32
conterá o nome dos documentos partilhados da biblioteca
00:03:35
bem como os ficheiros da subpasta a mover,
00:03:39
use uma fórmula Power FX para substituir este caminho por espaço vazio no seu
00:03:43
variável para recuperar apenas o caminho relativo dentro da pasta a ser processada.
00:03:51
Outro ponto importante,
00:03:52
o último caractere da sua variável de pasta conterá uma barra que
00:03:57
irá causar um problema ao mover o ficheiro a ser arquivado.
00:04:00
Use a função slice para recuperar a string de caminho do índice de posição
00:04:04
zero ao índice menos um correspondente à barra a ser removida.
00:04:10
Se o ficheiro estiver na raiz dos ficheiros para mover a pasta,
00:04:13
a variável conterá espaço vazio.
00:04:16
Caso contrário, conterá o caminho da pasta onde o ficheiro é colocado.
00:04:21
Gerir um teste de condição if se a variável de pasta estiver vazia.
00:04:27
Em caso afirmativo, adicione a acção do SharePoint para criar pastas
00:04:31
criar no seu site do SharePoint dentro da biblioteca de arquivos.
00:04:35
O caminho relativo da pasta correspondente ao ficheiro a ser processado
00:04:41
depois de criar ou não a pasta ainda dentro do loop.
00:04:44
Adicione a ação para mover o ficheiro processado,
00:04:46
consulte o arquivo a ser movido pelo seu caminho original completo e defina o
00:04:50
pasta de destino correspondente à sua biblioteca de arquivos seguida
00:04:55
pelo caminho armazenado na sua variável.
00:04:57
Se já existir outro ficheiro, opte por substituí-lo,
00:05:01
finalmente salvar e testar
00:05:05
ficheiros com mais de dois anos serão movidos para a raiz da sua biblioteca de arquivos
00:05:09
para ficheiros armazenados em subpastas. A estrutura original será recriada.
00:05:14
Isto é como criar um fluxo de arquivamento completo entre as bibliotecas do sharepoint.

No elements match your search in this video....
Do another search or back to content !

 

00:00:03
Benvenuto in questo tutorial dove imparerai a
00:00:05
automatizzare lo spostamento dei file in una libreria di archivi.
00:00:09
Questo flusso più complesso dovrà tenere conto di una serie di vincoli.
00:00:14
In questo video, utilizzerai variabili, elementi condizionali e funzioni Power FX
00:00:21
per iniziare
00:00:22
immagina di dover spostare i file da una cartella in una libreria di sharepoint.
00:00:26
A seconda dell'età dei file,
00:00:28
dovrai spostarli mantenendo la cartella di origine e la struttura dei file
00:00:32
per mantenere un'organizzazione identica dei contenuti nella libreria di destinazione.
00:00:36
Questa è la tua libreria di archivi. Nel
00:00:39
questo sito sharepoint,
00:00:40
troverai una libreria standard denominata documents in
00:00:43
in cui è presente una cartella denominata files da spostare
00:00:47
questa cartella contiene una serie di file di età diverse.
00:00:51
Facoltativamente, puoi aggiungere una colonna per il file
00:00:53
data di creazione o modifica che non viene visualizzata per impostazione predefinita.
00:00:58
La tua seconda libreria denominata archives è attualmente completa
00:01:02
vuota e dovrà essere compilata automaticamente
00:01:06
per iniziare.
00:01:07
Inizierai un flusso ricorrente che verrà eseguito il primo giorno di ogni mese alle 6 del mattino.
00:01:19
La prima azione sarà recuperare
00:01:21
i file della cartella contenente il potenziale
00:01:23
file da spostare durante l'elaborazione
00:01:26
l'intero contenuto della tua libreria di documenti.
00:01:28
In questo tutorial, ci limiteremo volontariamente a una cartella specifica.
00:01:34
Abilita le impostazioni avanzate per applicare una query che limiterà il flusso al
00:01:37
cartella scelta includendo i file nelle sottocartelle della cartella di destinazione.
00:01:43
Quindi inserisci i parametri relativi agli elementi annidati
00:01:46
e specifica la cartella da elaborare.
00:01:48
In
00:01:49
in questo esempio, sposteremo solo i file creati due anni fa o più.
00:01:54
La ricerca del filtro specificherà questo criterio.
00:01:57
Immettete il nome della colonna creata per la data di creazione del file.
00:02:01
Puoi anche utilizzare modified per la data dell'ultima modifica del file.
00:02:06
Quindi imposta il criterio su le che significa minore o uguale.
00:02:11
Inserirai quindi un apostrofo a cui fare riferimento
00:02:13
la tua scadenza relativa alla data di creazione del file.
00:02:17
Usa il pulsante power FX e inserisci il
00:02:20
seguente formula che consente di fare riferimento alla data corrente UTC
00:02:24
ora associata alla funzione A day definendo meno 730 giorni o circa due anni.
00:02:32
Concretamente. In questo esempio, sottrarrai 730 giorni dalla data corrente.
00:02:39
Quando SharePoint elenca i file, includerà i nomi delle sottocartelle.
00:02:43
Nel risultato,
00:02:44
dovrai limitare questa azione aggiungendo
00:02:46
un parametro di interrogazione che esclude gli oggetti di tipo cartella dal risultato
00:02:52
per ricreare la struttura originale nella libreria di archivio, inizializza un testo,
00:02:57
variabile denominata folder e popolala durante l'elaborazione futura
00:03:02
sono elencati i file datati più di due anni,
00:03:05
iniziano la loro elaborazione inizializzando una domanda per ciascuno
00:03:08
loop che recupererà il valore del corpo del contenuto dinamico,
00:03:12
che è l'elenco degli elementi da elaborare.
00:03:15
Sempre aggiornato. Compila la tua cartella.
00:03:18
Variabile recuperando il percorso di accesso di ogni file.
00:03:21
Scegli l'azione relativa alle variabili per impostare la cartella. Variabile.
00:03:27
Nota qui diversi elementi tecnici,
00:03:30
il percorso di accesso del file da spostare
00:03:32
conterrà il nome dei documenti condivisi della libreria
00:03:35
oltre ai file delle sottocartelle da spostare,
00:03:39
usa una formula power FX per sostituire questo percorso con uno spazio vuoto nel tuo
00:03:43
variabile per recuperare solo il percorso relativo all'interno della cartella da elaborare.
00:03:51
Un altro punto importante,
00:03:52
l'ultimo carattere della variabile della cartella conterrà una barra che
00:03:57
causerà un problema durante lo spostamento del file da archiviare.
00:04:00
Usa la funzione slice per recuperare la stringa del percorso dall'indice di posizione
00:04:04
zero rispetto all'indice meno uno corrispondente alla barra da rimuovere.
00:04:10
Se il file è alla radice della cartella dei file da spostare,
00:04:13
la variabile conterrà uno spazio vuoto.
00:04:16
Altrimenti conterrà il percorso della cartella in cui è inserito il file.
00:04:21
Gestisci una condizione if verificando se la variabile della cartella è vuota.
00:04:27
In tal caso, aggiungi l'azione SharePoint per creare cartelle a
00:04:31
crea nel tuo sito di SharePoint all'interno della tua libreria di archivi.
00:04:35
Il percorso relativo della cartella corrispondente al file in fase di elaborazione
00:04:41
dopo aver creato o meno la cartella ancora all'interno del ciclo.
00:04:44
Aggiungi l'azione per spostare il file elaborato,
00:04:46
fate riferimento al file da spostare seguendo il percorso originale completo e impostate il
00:04:50
segue la cartella di destinazione corrispondente alla libreria degli archivi
00:04:55
dal percorso memorizzato nella variabile.
00:04:57
Se esiste già un altro file, scegli di sostituirlo,
00:05:01
infine salva e prova
00:05:05
i file che hanno più di due anni verranno spostati nella cartella principale della libreria degli archivi
00:05:09
per i file archiviati in sottocartelle. La struttura originale verrà ricreata.
00:05:14
Ecco come creare un flusso di archiviazione completo tra le librerie di SharePoint.

No elements match your search in this video....
Do another search or back to content !

 

00:00:03
Добро пожаловать в этот урок, где вы научитесь
00:00:05
автоматизировать перемещение файлов в архивной библиотеке.
00:00:09
Этот более сложный процесс должен учитывать ряд ограничений.
00:00:14
В этом видео вы будете использовать переменные, условные элементы и функции Power FX
00:00:21
для начала
00:00:22
представьте, что вам нужно переместить файлы из папки в библиотеке sharepoint.
00:00:26
В зависимости от возраста файлов,
00:00:28
вам нужно будет переместить их, сохранив исходную папку и файловую структуру
00:00:32
чтобы сохранить идентичную организацию содержимого в целевой библиотеке.
00:00:36
Это ваша архивная библиотека. В
00:00:39
на этом сайте sharepoint,
00:00:40
вы найдете стандартную библиотеку с названием documents в
00:00:43
в которой есть папка с названием «Файлы для перемещения»
00:00:47
эта папка содержит серию файлов разного возраста.
00:00:51
При желании вы можете добавить столбец для файла
00:00:53
дата создания или изменения, которая по умолчанию не отображается.
00:00:58
Ваша вторая библиотека под названием archives в настоящее время полностью готова
00:01:02
пуста и должна быть автоматически заполнена
00:01:06
для начала.
00:01:07
Вы начнете регулярный сбор средств, который будет проходить первого числа каждого месяца в 6 утра.
00:01:19
Первым действием будет извлечение
00:01:21
файлы из папки, содержащей потенциал
00:01:23
файлы, которые нужно переместить, пока вы сможете их обработать
00:01:26
все содержимое вашей библиотеки документов.
00:01:28
В этом уроке мы добровольно ограничимся определенной папкой.
00:01:34
Включите дополнительные настройки, чтобы применить запрос, ограничивающий поток до
00:01:37
выбранная папка при включении файлов во вложенные папки целевой папки.
00:01:43
Затем введите параметры, относящиеся к вложенным элементам
00:01:46
и укажите папку для обработки.
00:01:48
В
00:01:49
В этом примере мы будем перемещать только файлы, созданные два года назад или более.
00:01:54
В запросе фильтра будет указан этот критерий.
00:01:57
Введите имя созданного столбца для даты создания файла.
00:02:01
Можно также использовать измененное в качестве даты последнего изменения файла.
00:02:06
Затем задайте критерий «le», означающий «меньше» или «равно».
00:02:11
Затем вы введете апостроф для ссылки
00:02:13
ваш крайний срок относительно даты создания файла.
00:02:17
Используйте кнопку Power FX и введите
00:02:20
следующая формула, позволяющая указать текущую дату в формате UTC
00:02:24
теперь связано с функцией «День А» путем определения минус 730 дней или около двух лет.
00:02:32
Конкретно. В этом примере вы вычтете 730 дней из текущей даты.
00:02:39
Когда SharePoint перечислит файлы, он будет включать имена подпапок.
00:02:43
В результате
00:02:44
вам нужно будет ограничить это действие, добавив
00:02:46
параметр запроса, исключающий из результата объекты типа папки
00:02:52
чтобы воссоздать исходную структуру в архивной библиотеке, инициализируйте текст,
00:02:57
переменная назвала папку и заполните ее во время дальнейшей обработки
00:03:02
перечислены файлы, датированные более двух лет,
00:03:05
начните их обработку, инициализировав заявку на каждый из них
00:03:08
цикл, который будет извлекать значение тела динамического содержимого,
00:03:12
это список элементов для обработки.
00:03:15
Всегда в курсе событий. Заполните папку.
00:03:18
Переменная, получая путь доступа к каждому файлу.
00:03:21
Выберите действие, связанное с переменными, чтобы настроить папку. Переменная.
00:03:27
Обратите внимание на несколько технических элементов здесь,
00:03:30
путь доступа к перемещаемому файлу
00:03:32
будет содержать имя общих документов библиотеки
00:03:35
а также файлы подпапок, которые нужно переместить,
00:03:39
используйте формулу power FX, чтобы заменить этот путь пустым местом в вашем
00:03:43
переменная для получения только относительного пути в обрабатываемой папке.
00:03:51
Еще один важный момент,
00:03:52
последний символ переменной папки будет содержать косую черту, которая
00:03:57
вызовет проблему при перемещении файла для архивирования.
00:04:00
Используйте функцию среза для извлечения строки пути из индекса позиции
00:04:04
от нуля до индекса минус единица, соответствующая удаляемой косой черте.
00:04:10
Если файл находится в корне папки с файлами, которую нужно переместить,
00:04:13
переменная будет содержать пустое место.
00:04:16
В противном случае в ней будет указан путь к папке, в которую помещен файл.
00:04:21
Управляйте тестированием состояния if, если переменная папки пуста.
00:04:27
В таком случае добавьте действие SharePoint для создания папок в
00:04:31
создайте на своем сайте SharePoint в своей архивной библиотеке.
00:04:35
Относительный путь к папке, соответствующей обрабатываемому файлу
00:04:41
после создания или отсутствия папки, которая все еще находится в цикле.
00:04:44
Добавьте действие по перемещению обработанного файла,
00:04:46
укажите полный исходный путь к файлу, который нужно переместить, и задайте
00:04:50
Далее следует папка назначения, соответствующая вашей архивной библиотеке
00:04:55
по пути, сохраненному в переменной.
00:04:57
Если другой файл уже существует, замените его,
00:05:01
наконец, сохраните и протестируйте
00:05:05
файлы старше двух лет будут перемещены в корень вашей архивной библиотеки
00:05:09
для файлов, хранящихся в подпапках. Оригинальная структура будет воссоздана.
00:05:14
Вот как создать полный процесс архивирования между библиотеками sharepoint.

No elements match your search in this video....
Do another search or back to content !

 

00:00:03
Bienvenido a este tutorial donde aprenderás a
00:00:05
automatizar el movimiento de archivos en una biblioteca de archivos.
00:00:09
Este flujo más complejo tendrá que tener en cuenta una serie de restricciones.
00:00:14
En este vídeo, utilizarás variables, elementos condicionales y funciones de Power FX
00:00:21
para empezar
00:00:22
imagine que necesita mover archivos de una carpeta de una biblioteca de SharePoint.
00:00:26
Según la antigüedad de los archivos,
00:00:28
tendrá que moverlos manteniendo la carpeta de origen y la estructura de archivos
00:00:32
para mantener una organización idéntica del contenido en la biblioteca de destino.
00:00:36
Esa es tu biblioteca de archivos. En
00:00:39
este sitio de SharePoint,
00:00:40
encontrará una biblioteca estándar llamada documents en
00:00:43
donde hay una carpeta titulada «Archivos para mover»
00:00:47
esta carpeta contiene una serie de archivos de diferentes edades.
00:00:51
Si lo desea, puede añadir una columna para el archivo
00:00:53
fecha de creación o modificación que no se muestra de forma predeterminada.
00:00:58
Tu segunda biblioteca, llamada archivos, está actualmente completa
00:01:02
vacía y tendrá que rellenarse automáticamente
00:01:06
para empezar.
00:01:07
Iniciarás un flujo periódico que se ejecutará el primer día de cada mes a las 6 de la mañana.
00:01:19
La primera acción será recuperar
00:01:21
los archivos de la carpeta que contiene el potencial
00:01:23
archivos que se moverán mientras se puedan procesar
00:01:26
todo el contenido de su biblioteca de documentos.
00:01:28
En este tutorial, nos limitaremos voluntariamente a una carpeta específica.
00:01:34
Habilite la configuración avanzada para aplicar una consulta que limitará el flujo a
00:01:37
la carpeta elegida al tiempo que incluye los archivos en las subcarpetas de la carpeta de destino.
00:01:43
A continuación, introduzca los parámetros relacionados con los elementos anidados
00:01:46
y especifique la carpeta que se va a procesar.
00:01:48
En
00:01:49
en este ejemplo, solo moveremos los archivos creados hace dos años o más.
00:01:54
La consulta de filtro especificará este criterio.
00:01:57
Introduzca el nombre de la columna creada para la fecha de creación del archivo.
00:02:01
También puede usar modificado para la fecha de la última modificación del archivo.
00:02:06
A continuación, defina su criterio para que le signifique menor o igual.
00:02:11
A continuación, introducirás un apóstrofe al que hacer referencia
00:02:13
su fecha límite en relación con la fecha de creación del archivo.
00:02:17
Use el botón Power FX e introduzca el
00:02:20
siguiente fórmula que permite hacer referencia a la fecha actual UTC
00:02:24
ahora se asocia a la función Un día al definir menos 730 días o aproximadamente dos años.
00:02:32
Concretamente. En este ejemplo, restará 730 días de la fecha actual.
00:02:39
Cuando SharePoint enumere los archivos, incluirá los nombres de las subcarpetas.
00:02:43
En el resultado,
00:02:44
tendrá que restringir esta acción añadiendo
00:02:46
un parámetro de consulta que excluye del resultado los objetos de tipo carpeta
00:02:52
para recrear la estructura original de su biblioteca de archivos, inicialice un texto,
00:02:57
variable denominada carpeta y rellénala durante el procesamiento futuro
00:03:02
se enumeran los archivos fechados durante más de dos años,
00:03:05
comienzan su procesamiento inicializando una solicitud para cada uno
00:03:08
bucle que recuperará el valor del cuerpo del contenido dinámico,
00:03:12
que es la lista de elementos a procesar.
00:03:15
Siempre dentro del circuito. Rellena tu carpeta.
00:03:18
Variable recuperando la ruta de acceso de cada archivo.
00:03:21
Elija la acción relacionada con las variables para configurar su carpeta. Variable.
00:03:27
Tenga en cuenta aquí varios elementos técnicos,
00:03:30
la ruta de acceso del archivo que se va a mover
00:03:32
contendrá el nombre de los documentos compartidos de la biblioteca
00:03:35
así como los archivos de la subcarpeta que se van a mover,
00:03:39
utilice una fórmula de Power FX para reemplazar esta ruta por un espacio vacío en su
00:03:43
variable para recuperar solo la ruta relativa dentro de la carpeta que se va a procesar.
00:03:51
Otro punto importante,
00:03:52
el último carácter de la variable de su carpeta contendrá una barra que
00:03:57
provocará un problema al mover el archivo para archivarlo.
00:04:00
Utilice la función de división para recuperar la cadena de ruta desde el índice de posición
00:04:04
cero para indexar menos uno correspondiente a la barra que se va a eliminar.
00:04:10
Si el archivo está en la raíz de la carpeta de archivos a mover,
00:04:13
la variable contendrá un espacio vacío.
00:04:16
De lo contrario, contendrá la ruta de la carpeta en la que se encuentra el archivo.
00:04:21
Gestione una prueba de condición de estado si la variable de la carpeta está vacía.
00:04:27
Si es así, agregue la acción de SharePoint para crear carpetas a
00:04:31
cree en su sitio de SharePoint dentro de su biblioteca de archivos.
00:04:35
La ruta relativa de la carpeta correspondiente al archivo que se está procesando
00:04:41
después de crear o no la carpeta que sigue dentro del bucle.
00:04:44
Agregue la acción para mover el archivo procesado,
00:04:46
consulte la ruta original completa del archivo que se va a mover y defina
00:04:50
siguió la carpeta de destino correspondiente a su biblioteca de archivos
00:04:55
por la ruta almacenada en su variable.
00:04:57
Si ya existe otro archivo, elija reemplazarlo,
00:05:01
finalmente guarda y prueba
00:05:05
los archivos de más de dos años se moverán a la raíz de su biblioteca de archivos
00:05:09
para los archivos almacenados en subcarpetas. Se recreará la estructura original.
00:05:14
Así es como se crea un flujo de archivado completo entre las bibliotecas de SharePoint.

No elements match your search in this video....
Do another search or back to content !

 

Mandarine AI: CE QUI POURRAIT VOUS INTÉRESSER

Reminder

Show