Results 1 to 3 of 3
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Before I spend the weekend banging my head against a brick wall, I'd appreciate any quick (small-effort on your part) response to the following situation:
    I get different results from common code using the FSO (stolen from VBA Forum

    My VBA code accesses two drives.
    One drive is an external drive attached to my laptop (drive I
    The other drive is an IDE attached to my Win XP networked BigBeige Box (drive BBB\\D)

    I run a regular FSO chunk of code (attached) and it tells me that
    on the networked IDE drive it CAN see the Autoexec.bat of zero length
    on the external drive it CAN NOT see the Autoexec.bat of zero length

    Huh?

    I used Robocopy to copy the IDE, across the network, to the external.
    I can SEE (Windows Explorer) the files on each drive.
    They are there!

    But the FSO code in its loop "For Each FI In .Items" does not see I:\Autoexec.bat.

    It can't be anything to do with a case-sensitive sort or comparison; I'm not that far ahead.
    I'm just single-stepping through the loop inspecting (View, Local variables) each FI.ITEM as it is processed.
    With the networked IDE drive Autoexec.bat shows up.
    With the external non-networked drive it does not.


    This is not a plea for an exhaustive effort on anyone's part. I'm willing to do the sleuthing, but I am up against a logic brick-wall here.

    P.S. I know a bit about the Security tab, disabling simple file sharing, and "access is denied". I just tried a right-click copy, right-click paste and can copy/paste the zero-length file from the networked IDE drive to the laptop External, not that that matters; I didn't want you to think it was related to ownership of the file.
    Attached Files Attached Files

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    I don't have anything exciting to say but I wonder what can be in a zero length file? Is it possible that the two drives are formatted differently (NTFS, FAT32) and therefore treat zero length files differently.

    Do you get a more expected result if the file has content?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='Andrew Lockton' post='773497' date='03-May-2009 07:02']I don't have anything exciting to say but I wonder what can be in a zero length file? Is it possible that the two drives are formatted differently (NTFS, FAT32) and therefore treat zero length files differently. Do you get a more expected result if the file has content?[/quote]

    AL> I wonder what can be in a zero length file?
    Nothing at all! Hah hah.
    I have often seen a zero-length Autoexec.bat and config.sys. Of themselves I’m not too worried, but I do regret not pursuing the issue further before the two drives were collected by the client Sunday. I wish that I had checked to see how many other “missing” files were zero-length.
    FWIW I am using RoboCopy and it recommends the /Create switch to create a folder tree on the first pass, to avoid fragmented directories. The second pass is run without /CREATE to copy file content. Two consequences:
    (1) EVERY file appears to exists on both drives, because files which are “access is denied” for a copy don’t object when only their directory entry is copied
    (2) It will no longer be sufficient for me to run FSO and obtain a text file listing of each drive, sort and match the listings, because /CREATE guarantees that a directory entry will exist. I will have to augment my agent with a FileLen test to confirm that the file contents have arrived.

    AL> Is it possible that the two drives are formatted differently?
    No. Both drives are WinXP professional NTFS.

    It struck me as odd that FSO across the network (to the IDE drive) could see the files, and FSO locally (to the external drive) could not. That is, my “Agent1” claimed 4,096 files were missing (peculiar number, no?!!).

    I wrote a second agent, Agent2, whose task was to run through the 4,096 entries from Agent1’s LOG files and double-check.
    One of the 4,096 was a file on the Target drive missing from the Source drive - the System Volume Information stuff. That left 4,095 files supposedly missing from the target drive.
    Whereas Agent1 used FSO, Agent2 used a blnFileExists function (the old On Error, test FileLen trick), and Agent2 reported only ONE file truly, truly missing. That is, 4,094 "errors" were false errors.

    The one exception (my sole failing!) was a shortcut lnk to a web site. I should have remembered this from last year. (here? or here?).

    A shortcut link has an extent of .lnk but that extent will never (?) show up in Windows Explorer. And I certainly wasn’t testing the file to see if it was a shortcut link.

    I am now starting from scratch and documenting my findings, trying to copy the entire contents of an 80GB drive on a networked computer to a 400GB networked drive on the same computer. WorkInProgress: http://www.torontovba.com/InterruptedByDelivery.htm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •