Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script? If file size =

Status
Not open for further replies.

dhscott

IS-IT--Management
Jan 7, 2004
22
0
0
US
Hi,
I am trying to set up a logon script that will copy a file down from the network to each workstation, but I only want the file copied if the existing file on the workstaion is smaller than the one on the network. I am currently using xcopy and checking the date of the files, but it would really help if I could somehow do it by file size instead.
Any suggestions?
Thank you
 
XXCopy can do this:

Where:
A = file in source but not destination
B = file not in source but in destination

The comparison prior to copy switches that could help:

/BI all files in A plus files in B that are different in filetime or size
/BX all files in A plus files in B that are different in filetime
/BZX all files in A plus files in B that are different in size
/BZL all files in A plus files in B that are larger
/BZS all files in A plus files in B that are smaller
 
You may want to try vbscript, check out this:
thread329-860769

Let us know your results!
X
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top