1 Replies - 786 Views - Last Post: 13 July 2010 - 12:26 PM Rate Topic: -----

#1 Guest_JayDP123*


Reputation:

Need help updating folders in windows through an Excel spreadsheet

Posted 13 July 2010 - 10:46 AM

Hello, I am in a company that has lots of pictures/images on multiple harddrives and computers, and also has all of these images' information in an excel spreadsheet (such as image #, date the image was acquired, type of camera used etc...). However after the images are processed there are many that need to be rejected, these rejected images are noted in the Spreadsheet. I am now looking to create a program or script that looks at the excel spreadsheet, finds out which items are rejected(as noted by us in the spreadsheet), and then deletes these items from windows. Is this possible?

Any help on this would be greatly appreciated. I am a beginner programmer looking to learn a thing or two so hopefully someone can help me out?

Thanks

Is This A Good Question/Topic? 0

Replies To: Need help updating folders in windows through an Excel spreadsheet

#2 Fib  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 161
  • View blog
  • Posts: 554
  • Joined: 12-March 09

Re: Need help updating folders in windows through an Excel spreadsheet

Posted 13 July 2010 - 12:26 PM

Hello JayDP123,

Check out my tutorial on Using Excel With Visual Basic 6!.

Especially pay attention to the section named "Reading data from a worksheet!" but you should still read everything before that. That should give you a good idea how to check your worksheet for the images that were rejected.

Then, to delete a file you could use the FileSystemObject. The FileSystemObject has a function called DeleteFile() which accepts a string that is the full path to the file. You can read more about the FileSystemObject here: FileSystemObject

If you need more help, please post again with any problems and/or code errors you are receiving.

I hope that helps!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1