Batch Scripting
hello geeks,
i have bath file running on exchange 2010. script moving file map drive local drive using simple command , creating log well. running smoothly. want script read file size after moving file local drive. can add in log file size can print?
see the script codes below;
net use w: \\192.168.x.x\rms
set dir=w:\xyz\
cd /d %dir%
set start=%time%
echo start %start% >d:\log\log.txt
move w:\xyz\*.rar d:\rms-backups\ >>d:\log\log.txt
set end=%time%
echo end %end% >>d:\log\log.txt
exit
please advise.
hi brijesh,
move.exe command doesn't contain such function,
see here:https://support.microsoft.com/en-us/kb/240268
i'd prefer use robocopy, see sample:
robocopy c:\share\myconfig\ \\10.168.196.93\share * /mov /bytes /log+:c:\robocopy.txt
refer link:
https://technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx
besides, more cmd command found here:
https://technet.microsoft.com/en-us/library/bb490890.aspx
best regards,
andy
please remember mark replies answers if , unmark them if provide no help.
if have feedback technet subscriber support, contact tnmff@microsoft.com.
Windows Server > Windows PowerShell
Comments
Post a Comment