Re: URGETN !. How to check a file status/attributes ???

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



That probably wont work as (in some cases) when copying a file the system
allocates the full size of the file then fills the space so the system will
return the full size even if the whole file is not copied.

You could try to rename the file, if it fails the file is still busy.

Definately get rid of the FSO and also as there are files coming in all the
time, store a list of files and work through that because if you iterate a
(FSO) collection, the folder content may change before you get to the end of
the collection which could cause unpredictable errors.

Regards
Dave.


"Andibevan" <Andibevan@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:uCzreKvrFHA.2592@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Ahmed,
>
> Is there any way that you could obtain the size of the files on the FTP
> folder?
>
> If you could you could then compare the sizes of file in d:\process and on
> the FTP and only copy the files if the size matches.
>
> http://www.vbip.com/protocols/ftp/vb-ftp-client-library/default.asp
> provides
> some code for implementing FTP within VB.
>
> Regards
>
> Andy
>
> "Ahmed Jewahar" <ahmed.jewahar@xxxxxxx> wrote in message
> news:ONGUZlsrFHA.2996@xxxxxxxxxxxxxxxxxxxxxxx
>>
>> Dear All
>>
>> I'm writing a program in VB which will read all files from a folder that
>> I specify. For instance the folder name is "D:\process"
>>
>> Folder "D:\process" is contniiously getting the files every 1 minniutes
>> from another server via FTP. What I'm basically looking for is I need
>> to identify the file(s) which is completeley copied and files whcih are
>> in copying in progress. I need to move only files which are completed
>> the copying.
>>
>> Below is the code that I have written. But, I got stuck with above !.
>>
>> Dim fso, mFolder, mFile, mFiles, s
>> Set fso = CreateObject("Scripting.FileSystemObject")
>> Set mFolder = fso.GetFolder("D:\Process")
>> Set mFiles = mFolder.Files
>>
>> ReDim FileNameArray(mFolder.Files.Count + 1, 2)
>> Dim mcounter As Integer
>> mcounter = 0
>> For Each mFile In mFiles
>>
>> ****************************************
>> I need some code here to find out whehter file being copied completely
>> or not
>> ****************************************
>> mcounter = mcounter + 1
>> FileNameArray(mcounter, 1) = mFile.Path
>> FileNameArray(mcounter, 2) = mFile.Name
>>
>>
>> Next
>>
>> fso.CopyFile FileNameArray(n, 1), "D:\work\"
>>
>>
>> In order to find this, what property I need to check to find out status
>> of a file such as "copy completion" and "Copying in progress".
>>
>> Many thanks and regards,
>>
>>
>>
>>
>> *** Sent via Developersdex http://www.developersdex.com ***
>
>


.



Relevant Pages

  • Re: How to get File Status (File System)
    ... I need to move only files which are completed the copying. ... > Dim fso, mFolder, mFile, mFiles, s ... If you had control over the FTP side then the best way is to download ...
    (microsoft.public.vb.general.discussion)
  • Re: what is the easist way to transfering files on Ethernet?
    ... connection, both running Linux. ... Konqueror-based FTP so it copies just like you are copying from one ... I like SSH for command line file copying. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: URGETN !. How to check a file status/attributes ???
    ... Is there any way that you could obtain the size of the files on the FTP ... > I'm writing a program in VB which will read all files from a folder that ... > Dim fso, mFolder, mFile, mFiles, s ... > Dim mcounter As Integer ...
    (microsoft.public.vb.general.discussion)
  • Re: procmail has stopped working
    ... my webhosting support came back overnight with the ... What worries me is that I simply had no idea that copying the file over ... Does that always happen with ftp, or is it a problem with nautilus? ... Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org ...
    (Ubuntu)
  • Re: How to determine if a computer on the network is a UNIX or windows computer
    ... however if the computer is UNIX i must ftp if it is ... windows I can copy, I know how to do both I just don't know how to ... In the section of code where the file is copied, try copying with one ...
    (microsoft.public.scripting.vbscript)