Using the xp_cmdshell in sql…

Syntax
xp_cmdshell ‘my_command’ [, no_output]

Sample Copy
EXEC master..xp_cmdshell ‘copy c:\my_file.doc c:\new_folder’, NO_OUTPUT

Sample Dir
DECLARE @result int
EXEC @result = master..xp_cmdshell ‘dir *.exe’
IF (@result = 0)
PRINT ‘Ok’
ELSE
PRINT ‘Error’

Works in Sql Server and Sybase.😀

see u…