How to DELETE Thumbs.db File?

  • Can anyone help this?

  • if we can not delete this file then Im gonna write a script to get the excel filename only start with "INV"

  • You mean in Explorer? Or programatically?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I have a script task in my SSIS package and count file numbers in the folder but always return mecount = 1 even if there is no file placed and then I found that there is a thumbs.db file in this folder. I'm trying to delete that.

  • caojunhe24 (11/19/2015)


    I have a script task in my SSIS package and count file numbers in the folder but always return mecount = 1 even if there is no file placed and then I found that there is a thumbs.db file in this folder. I'm trying to delete that.

    change your script task to count the specific type of files you want to process, not all files no matter what.

    something like using Directory.GetFiles(path,searchPattern)

    int TheCounter = (Directory.GetFiles(@"C:\Data\Import","INV*.csv")).Length();

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply