Table of Contents

move

Free

Description

The move command moves file(s) from one folder in the vault to another, or moves external filesystem files into a destination folder.

You can move:

  • A single file
  • A folder
  • Files returned from a search query
  • External filesystem files returned from a filename search

When a vault file is moved:

  • All references are automatically updated by SOLIDWORKS PDM.
  • Any parent files referencing the moved file are updated.
  • File history and versions are preserved.

Syntax

move (-source file_or_folder | -search search_query | -fsSearch filename_pattern -fsSearchDir external_folder) -directory existing_destination [-recursive]

Parameters

Parameter Alias Required Description
-source No File or folder to move. Use one source mode: -source, -search, or -fsSearch with -fsSearchDir.
-directory -dir Yes Existing destination folder. PDM moves stay in the vault; filesystem moves require both endpoints outside vault views. Existing files are never overwritten in filesystem mode.
-search No Search query scoped to the current PDMShell directory. Use one source mode only.
-fsSearch No Filename pattern for external filesystem files, such as *.pdf. Requires -fsSearchDir.
-fsSearchDir No External filesystem folder to search. Requires -fsSearch.
-recursive No Includes subfolders when used with -search or -fsSearch.

More about parameters

  • source
    The complete file path of the file to move.
    You can also specify a folder path. This will move the actual folder. Choose exactly one source mode; do not combine it with -search or filesystem search.

  • directory
    Target directory where to move the file(s) to. Must already exist. For vault moves, this must be a vault folder. For external filesystem moves, this must be an external filesystem folder.

  • search
    Search query. PDMShell searches from the current directory, moves matching files to -directory, and does not use -source as a search scope. This does not support moving folders from search results.

  • fsSearch
    Filename pattern for external filesystem files. Use this with -fsSearchDir when moving files that are outside the vault, for example *.pdf or Report*.xlsx.

  • fsSearchDir
    External filesystem folder to search when -fsSearch is used. This mode does not move files from vault views, does not overwrite destination files, and does not move through linked or reparse paths.

  • recursive
    Affects the -search and -fsSearch parameters. Specify -recursive to make the search recursive.
    For -search, the start location is the current PDMShell directory. For -fsSearch, the start location is -fsSearchDir.


Examples

Example 1: Move a Single File

move -source "C:\Vault\Parts\Bracket.SLDPRT" -directory "\Released"
## Moves a single file to the Released folder.

Example 2: Move a Folder

move -source "\Projects\OldProject" -directory "\Archive"
## Moves the OldProject folder to Archive.

Example 3: Move Search Results

move -search "Name=%.sldprt%" -recursive -directory "\Archive"
## Moves all part files found in the current directory, including subfolders, to the Archive folder.

Example 4: Move External Files by Filename Pattern

move -fsSearch "*.pdf" -fsSearchDir "C:\Exports" -recursive -directory "D:\Released PDFs"
## Moves matching external PDF files from C:\Exports and its subfolders into D:\Released PDFs.

Notes

  • You must have permission to move the file(s).
  • If the file is referenced by other files, referencing paths are updated automatically.
  • If the file has references, those reference paths are updated automatically.
  • Target directory must already exist.
  • Search mode always starts from the current PDMShell directory. Use cd to change the search scope before running move -search.
  • External filesystem mode uses -fsSearch and -fsSearchDir together, cannot be combined with -source or -search, and keeps the source and destination outside vault views.
  • PDM moves preserve version history. Filesystem moves do not create or update PDM history or references.
  • Filesystem wildcard patterns use * or ?, not a PDM search query. Recursive mode flattens matching files into the destination without recreating subfolders.
  • Filesystem preflight rejects existing destination names and duplicate basenames before moving anything. Completed moves are not rolled back if a later move fails or is cancelled.

Video

Watch on YouTube

Search results report

Add -csv "C:\Reports\results.csv" when using -search to save operation results. The first columns are file ID, parent folder ID, file name and output, followed by status and error details. The report folder must exist. New vault reports are added to PDM; existing vault reports must be checked out by you on this computer and remain checked out. External reports are replaced. See CSV operation reports for command-specific outcomes.