ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Find all files in a directory that match a list of names and make copy of each

<< < (2/2)

questorfla:
sort of
It turns out there is one small slitch as stated above.
In the end, i stil have several hundred fiules that DO have the & sign in them
If i had a way to compare hases of the files instead of names i could get by this
otherwise it is back to "by hand" on those that have the "&"

Thanks for reminding me i had another post  which forum was it is so i can move/remove/merge the two

4wd:
You could probably fix the & in file names thing by escaping them, (^&) - trouble is DOS is so convoluted when doing something like that, (even though string substitution is relatively easy), that it's usually quicker and easier to write something in AHK or AutoIt.

I just do it in DOS for the intellectual exercise ... or because I'm a masochist  ;D

questorfla:
My vote is for Masochist!~! :D

I just loaded the Gnu Win toolbox and am trying to state the issue is "sed" or some other Gnu tool
The FIRST thing I did which i am now very glad of was to take the 100 websites using the files in their DB;s Off-line long enough to extract a copy of every pdf file so i could search without fear of loss.

All the files that were missing are in the Websites which while active I cannot do much.
Working with a "copy" gives me a lot more confidence :)
So I am considering doing the same thing to the actual file NAMES that I did to the file LIST
change all the & to any other "unique" character or phrase so i can run those last ones and be done with it.

If there WAS a way to do a quick hash of the filename and run it against the hash of the names in the list, that SHOULD also be a working solution
you wrote you code so tight though i Dont know where i can insert the hash conversion to use the results for comparison rather than the name itself.
Can you "spread it out a little" for "Scripting for Dummies?"  Give me room to insert the conversion into the loop?  it runs so fast now that I see only a blur.  I removed the @echo off due to the run time with no response and i needed to see what was going on in order to find that "_" that he had used a " " instead.

Navigation

[0] Message Index

[*] Previous page

Go to full version