FileMove
This function allow to copy/move/delete a file.
select dbo.FileMove('c:\frompath', 'file.txt', 'c:\topath', null, 0, 1)
parameters:
@pathFrom
it's the source directory
@fileFrom:
it's the source file
@pathTo:
it's the destination path
@fileTo:
it's the name of file in case of copy/move.
if null, will has the same name of source
@action:
- 0 -> copy nad paste
- 1 -> cut and paste
- 2 -> delete
@overwrite:
1 to overwrite, 0 to create a new one and will give you and error in case file already exist