File.Move
Description
- Moves a file or files to another location, effectively renaming it to the new path.
Syntax
- File.Move(source, destination)
Parameters
- source
- (string) full path to the file to be moved
- Use wildcards to move groups of files.
- destination
- (string) path to the new file location
- If destination does not included a file name, source file name is used.
Examples
- File.Move(?"c:\mypath\in.txt", ?"c:\output\out.txt")
- Moves "c:\mypath\in.txt" to "c:\output\out.txt".
- File.Move(?"c:\docs\*.txt", ?"c:\backup\")
- Use the "*" wildcard to that specify all text files in "c:\docs" are to be moved to "c:\backup".
- File.Move(?"c:\mydocs\file?.txt", ?"c:\logs")
- Uses the "?" wildcard to specify that all text files with a file name "file" plus one character & extension .txt should be moved to folder "c:\logs".
Notes
- This function is the same as File.Rename().