Home  |  About  | Last |  Submit  |  Contact
AllQuests.com



Previous Question:  Multiple inputs to media center  Vista Music and VideoNext Question:  Cannot Reinstall Office 2003  Office Setup
Question Re: How can I check that a file has been succesfully copied? ( TechArena Community Windows Server Help )
Updated: 2008-04-19 05:23:13 (3)
Re: How can I check that a file has been succesfully copied?



Apologies for not following-up with you sooner & thanks for replying.
Rob: I haven't heard of crc305.exe but I will take a look at it.
Pegasus: I know that the unzipped files must be have the previous days's
date & the files must be larger than 0 k.
Thanks again.
Veets



"Rob Hagman" <Rob.Hagman@nospam.nospam> wrote in message
news:xn0ev5xnwa2aecp006CEN@msnews.microsoft.com...
>
>
> Microsoft has a command-line tool you can use for this called
> crc305.exe
>
> I think its in the resource-kit.
>
> It calculates a CRC Hash over one ore more files
>
> You can Use it to calculate a CRC Hash over the files
> before you compress and send them from your script
> at the source side, and then calculate a CRC Hash at the destination
> after un compression from the un-compression script
>
> If both the calculated CRC Hash values match, the files are the same
>
> If you can't find the crc305.exe tool there are many other free-ware
> tools available that do the same (search for crc or md5 hash tools)
>
> Rob Hagman
>
>
>
> on 19-12-2006 Pegasus (MVP) wrote:
>
>> It all depends on what you know about the unzipped files:
>> - Number of files?
>> - Total size of all files?
>> - The existence of a certain key file?
>>
>> If you tell us what you know then someone will suggest
>> a suitable method.
>>
>>
>> "Veets" <Veets@h0tmail.com> wrote in message
>> news:OzgrQa3IHHA.3676@TK2MSFTNGP03.phx.gbl...
>> > Hi there,
>> > I have a batch file running on a Windows 2003 server which does the
>> > following:
>> > 1) Connects to a remote FTP server & copies some zip files locally
>> > to a

>> temp
>> > folder
>> > 2) The zip files are then uncompressed to a main folder
>> >
>> > This is working fine but I would like to delete the zip files in
>> > the temp folder once they've been extracted to the main folder.
>> > Before I do this however, I would like to make sure that all the
>> > files have actually been successfully extracted before they are
>> > deleted. Is there a way for me to 'check' for this? Should I check
>> > the date, file size, etc?
>> >
>> > Any advice/suggestions are appreciated.
>> > TIA
>> > Regards,
>> > Veets
>> >
>> >

>
>
>
> --
>




Answers: Re: How can I check that a file has been succesfully copied? ( TechArena Community Windows Server Help )
Re: How can I check that a file has been succesfully copied?


You could add these lines to your batch file:

Line1 @echo off
Line2 dir "d:\Expanded" | find /i " 0 bytes" && goto :eof
Line3 xxcopy /do#1 /L "d:\Expanded" "%temp%" | find /i "Files Selected" |
find "= 0" && goto :eof
Line4 echo del "%temp%\Something.zip"

Line 2 will check if there are some files in the main folder.
If there are none then the program will exit.

Line3 will pretend to copy all files that are one day old.
If none are found then the program will exit. You can
download xxcopy.exe from a number of sites. You also
need to think about your weekend operation.

Line5 will delete your zip file. Remove the "echo" word in
order to activate it.

Do not retype these lines - use copy & paste in order to avoid
making mistakes.

"Veets" <Veets@h0tmail.com> wrote in message
news:e5zJnz0LHHA.1424@TK2MSFTNGP04.phx.gbl...
> Apologies for not following-up with you sooner & thanks for replying.
> Rob: I haven't heard of crc305.exe but I will take a look at it.
> Pegasus: I know that the unzipped files must be have the previous days's
> date & the files must be larger than 0 k.
> Thanks again.
> Veets
>
>
>
> "Rob Hagman" <Rob.Hagman@nospam.nospam> wrote in message
> news:xn0ev5xnwa2aecp006CEN@msnews.microsoft.com...
> >
> >
> > Microsoft has a command-line tool you can use for this called
> > crc305.exe
> >
> > I think its in the resource-kit.
> >
> > It calculates a CRC Hash over one ore more files
> >
> > You can Use it to calculate a CRC Hash over the files
> > before you compress and send them from your script
> > at the source side, and then calculate a CRC Hash at the destination
> > after un compression from the un-compression script
> >
> > If both the calculated CRC Hash values match, the files are the same
> >
> > If you can't find the crc305.exe tool there are many other free-ware
> > tools available that do the same (search for crc or md5 hash tools)
> >
> > Rob Hagman
> >
> >
> >
> > on 19-12-2006 Pegasus (MVP) wrote:
> >
> >> It all depends on what you know about the unzipped files:
> >> - Number of files?
> >> - Total size of all files?
> >> - The existence of a certain key file?
> >>
> >> If you tell us what you know then someone will suggest
> >> a suitable method.
> >>
> >>
> >> "Veets" <Veets@h0tmail.com> wrote in message
> >> news:OzgrQa3IHHA.3676@TK2MSFTNGP03.phx.gbl...
> >> > Hi there,
> >> > I have a batch file running on a Windows 2003 server which does the
> >> > following:
> >> > 1) Connects to a remote FTP server & copies some zip files locally
> >> > to a
> >> temp
> >> > folder
> >> > 2) The zip files are then uncompressed to a main folder
> >> >
> >> > This is working fine but I would like to delete the zip files in
> >> > the temp folder once they've been extracted to the main folder.
> >> > Before I do this however, I would like to make sure that all the
> >> > files have actually been successfully extracted before they are
> >> > deleted. Is there a way for me to 'check' for this? Should I check
> >> > the date, file size, etc?
> >> >
> >> > Any advice/suggestions are appreciated.
> >> > TIA
> >> > Regards,
> >> > Veets
> >> >
> >> >

> >
> >
> >
> > --
> >

>
>






Re: How can I check that a file has been succesfully copied?


Does your zip utility set errorlevel? I've tested errorlevel in batch files
that used pkzip, and was satisfied with the results.
--
Greg Stigers, MCSA
remember to vote for the answers you like





Re: How can I check that a file has been succesfully copied?


Greg,
It seems like I've overlooked the obvious here. We are using pkzip; I'll
take a look at it.
Thanks for everyone's replies.
Regards,
Veets

"G" <gregstigers+msnews@spamcop.net> wrote in message
news:OOVAXFCMHHA.5016@TK2MSFTNGP04.phx.gbl...
> Does your zip utility set errorlevel? I've tested errorlevel in batch
> files that used pkzip, and was satisfied with the results.
> --
> Greg Stigers, MCSA
> remember to vote for the answers you like
>






Previous Question:  Multiple inputs to media center  TechArena Community  Vista Music and VideoNext Question:  Cannot Reinstall Office 2003  TechArena Community  Office Setup

- Source: Re: How can I check that a file has been succesfully copied? TechArena Community Windows Server Help
- Previous Question: Multiple inputs to media center TechArena Community Vista Music and Video
- Next Question: Cannot Reinstall Office 2003 TechArena Community Office Setup