Question : Move files using a powershell script

Hi,

I have a problem... I have a script (.bat) running on a W2K3 configured in a schedule task... all fine! But now I need to use this script on a W2K8 R2. If I don't use a schedule task, it runs, but if I configure a schedule, I have 0x0 result but the script don't work...

The script (W2K3 server):
1:
2:
3:
4:
5:
move "E:\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\*.bak" "Z:\Backups01\"
move "F:\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\*.bak" "Z:\Backups02\"
move "G:\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\*.bak" "Z:\Backups03\"
echo

(Z drive is a map network drive)

Now I need to create a new script running on powershell.

- I don't use map network drive to access drive in other server.
- Move more files (with the same extension) from other local drives
- If the script don't move files send me an mail with the error

Create a schedule task in W2K8
- Configured in a schedule task to run daily using the .ps1 file

Can anyone help me, please?

Thanks in advanced.

Answer : Move files using a powershell script

The preferred aspect ratio for office work is 4:3, typically 1280x1024 (which is really 5:4, but close enough).

But 4:3 monitors are relatively hard to find these days. Older widescreen monitors are 16:10, newer ones are 16:9, which is the same aspect ratio as widescreen TV's.
Random Solutions  
 
programming4us programming4us