Re: coping jpg files from computer help




"keeping" <guest@xxxxxxxxxxxxxxxxx> wrote in message
news:ff1036493a10cd0aff0407e83bc8d001@xxxxxxxxxxxxxxxxxxx

Hello All,
I am very green with VBS, so i appologize in advance. I am trying to
figure out how to write a VBS to scan a particular extension (i.e. *.jpg
or *.doc) on my entire hard drive (C:) including subfolders and copy
them to a single folder on the computer or a USB drive. i want to be
able to change the extension as needed or if it is possible be able to
copy multiple extensions, also a completion message would be really
nice. Hopefully this is possible.
Thanks in advance

You didn't state the operating system of the computer; if it is WXP, you
could manually open a search window and have it list all the .jpg files.
This search also can go at least one level deep into .zip and .cab
compressed files, which can be handy at times. You could then start your
..VBS file which would use the shell.application object to find the search
window, and from there drill down to the shell folder object that represents
the search window. This shell folder object has a folderItems property
which gives you a collection of all the items in the search window. The
script could then go through the collection and perhaps weed out duplicate
files based on file name, size, or file checksum (CRC-32 and/or SHA-1 with
Microsoft's command line tool fciv.exe). You might still have collisions -
files with identical names and with different contents, from different
original folders, and the script could count these and decide on an
appropriate number of folders to hold the duplicate file names. Once all
this is done, the script could copy the files one by one from their original
folders to the appropriate destination folder.

I think Vista's file search is too different from WXP's for this approach to
work on Vista, but it is possible that it can be done there too.

I am working on a similar project right now on WXP.

-Paul Randall


.



Relevant Pages

  • Re: coping jpg files from computer help
    ... I am very green with VBS, ... figure out how to write a VBS to scan a particular extension (i.e. *.jpg ... Remember to exclude the folder you are copying to from the search or things may go pear shaped:) ... Also remember that some of the files your script finds in different folders may have identical names. ...
    (microsoft.public.scripting.vbscript)
  • Re: openssl extension not loading (need to open https stream)
    ... you configured PHP?" ... I have also enabled the openssl extension and made sure it is ... in the extension folder. ... the apache module ...
    (comp.lang.php)
  • Re: open statement, pathname and file extension
    ... EOFalso refers to that channel, which is why EOF fails when k is greater ... App.Dir tells you the application folder. ... You can't use Open to work out the filename extension for you. ... The code requires to declare the complete file pathname so that the ...
    (microsoft.public.vb.syntax)
  • Re: How do I Save from MHTML .mht to HTML format only
    ... The issue was the difference between html and htm on the index folder so I ... I also notice that your host says you have to use the .html extension for ... Double check that you did indeed upload to the ...
    (microsoft.public.publisher.webdesign)
  • Using VBA for manipulation of files
    ... The Jet database engine would not allow me to ... set the folder location as a variable, ... name and then change the extension from .xls to .txt. ... Dim myfile ...
    (microsoft.public.access.modulesdaovba)