Jump to content

Sh4dow

Member
  • Posts

    45
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by Sh4dow

  1. Sh4dow

    Batch File!

    Yzöwl - I hardly understand your last post. I couldn't write a loop if you paid me 1 million bucks!!
  2. Sh4dow

    Batch File!

    The problem is this, I cannot give the words that I am searching for. I am looking for these words in any file within 300GB of data. I do not want someone to "write one for me." I have been using every possible combination of switches from this page to attempt to do this myself. http://www.fsref.com/pr/dosxp.shtml#findstr This stuff isn't easy, as I mentioned before. I have never scripted anything. So if I seem frustrated it's only because I have been attempting to do this for 2 weeks and I have not been able to come up with a solution. I feel pretty stupid that you guys can write this script in like 5 minutes yet I've been trying for 2 weeks and can't even figure out a FOR loop. I'm posting here because I need help, and I appreciate everything that you have posted. My boss is on my a** everyday, and I'm working to try to find a solution.
  3. Sh4dow

    Batch File!

    FINDSTR /SIM "\<hat\>" "C:\WINDOWS\*.*" >%TEMP%\hat.list FINDSTR /SIM "\<cat\>" "C:\WINDOWS\*.*" >%TEMP%\cat.list FINDSTR /SIM "\<rat\>" "C:\WINDOWS\*.*" >%TEMP%\rat.list FINDSTR /IM "\<cat\>" /F:"%TEMP%\hat.list" >%TEMP%\hat-cat.list FINDSTR /IM "\<rat\>" /F:"%TEMP%\hat.list" >%TEMP%\hat-rat.list FINDSTR /IM "\<rat\>" /F:"%TEMP%\cat.list" >%TEMP%\cat-rat.list FINDSTR /IM "\<rat\>" /F:"%TEMP%\hat-cat.list" >%TEMP%\hat-cat-rat.list I tried it in cmd and it works. Lines 4-7 give no output. I just want to find cat, hat, rat within one folder. Then find any of the files that have 2 of those words in it. Feel free to write a VB script, I don't care, I just want it to work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4. Sh4dow

    Batch File!

    C:\>FINDSTR /SIM "\<hat\>" "*.*" >hat.list FINDSTR: Cannot open Documents and Settings\LocalService\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat FINDSTR: Cannot open Documents and Settings\LocalService\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat.LOG FINDSTR: Cannot open Documents and Settings\LocalService\NTUSER.DAT FINDSTR: Cannot open Documents and Settings\LocalService\ntuser.dat.LOG FINDSTR: Cannot open Documents and Settings\NetworkService\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat FINDSTR: Cannot open Documents and Settings\NetworkService\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat.LOG FINDSTR: Cannot open Documents and Settings\NetworkService\NTUSER.DAT FINDSTR: Cannot open Documents and Settings\NetworkService\ntuser.dat.LOG can I ignore these?
  5. Sh4dow

    Batch File!

    The script works perfectly for finding cat, hat, and rat. I just need to come up with a way to find cat in the hat list, rat in the hat list, etc.. Would it correct the problem if we changed the output of the files to another directory, then ran the search again within that directory? For ex) FINDSTR /SIM "\<hat\>" "*.*" >"C:\My Documents\Results\hat.list" FINDSTR /SIM "\<cat\>" "*.*" >"c:\My Documents\Results\cat.list" FINDSTR /SIM "\<rat\>" "*.*" >"c:\My Documents\Results\rat.list" Now I have a list of cat, hat, rat. But they are just the file names! So if I searched for cat in hat.list I wouldn't find anything because hat.list just contains the names of the files!
  6. I use to game all the time. Which game is giving you lag? Do you play online multiplayer games? If so I can refer you to some sites. maybe you have a lot of services running in the background, spyware, adware? Could be so many different things.
  7. Sh4dow

    Batch File!

    The problem I see with the FINDSTR script is the /F command only looks at the file name, not WITHIN the actual file. I need to search for the word " cat " in the files that are in the hat-rat.list. This is getting way more complicated than I originally planned. I do not think that I will be able to complete this task without a lot of help. I also found that if you run the first 9 lines seperately then do not give a correct ouput. FINDSTR /I /M /S /C:" hat " *.* > hat.list FINDSTR /I /M /S /B /C:"hat " *.* >> hat.list FINDSTR /I /M /S /E /C:" hat" *.* >> hat.list FINDSTR /I /M /S /C:" cat " *.* > cat.list FINDSTR /I /M /S /B /C:"cat " *.* >> cat.list FINDSTR /I /M /S /E /C:" cat" *.* >> cat.list FINDSTR /I /M /S /C:" rat " *.* > rat.list FINDSTR /I /M /S /B /C:"rat " *.* >> rat.list FINDSTR /I /M /S /E /C:" rat" *.* >> rat.list The cat list is the only one that gives true results. The other lines are exactly the same but they do not. I'm so confused!!
  8. Sh4dow

    Batch File!

    Yes the errors are gone, however for some reason the script still doesn't find all instances of the 3 dirty words
  9. Sh4dow

    Batch File!

    That being said, I edited purewaveform's script to this: FINDSTR /I /M /S /C:" hat " *.* > hat.list FINDSTR /I /M /S /B /C:"hat " *.* >> hat.list FINDSTR /I /M /S /E /C:" hat" *.* >> hat.list FINDSTR /I /M /S /C:" cat " *.* > cat.list FINDSTR /I /M /S /B /C:"cat " *.* >> cat.list FINDSTR /I /M /S /E /C:" cat" *.* >> cat.list FINDSTR /I /M /S /C:" rat " *.* > rat.list FINDSTR /I /M /S /B /C:"rat " *.* >> rat.list FINDSTR /I /M /S /E /C:" rat" *.* >> rat.list FINDSTR /I /M /S /C:" cat " /F:hat.list > cat-hat.list FINDSTR /I /M /S /B /C:"cat " /F:hat.list >> cat-hat.list FINDSTR /I /M /S /E /C:" cat" /F:hat.list >> cat-hat.list FINDSTR /I /M /S /C:" rat " /F:hat.list > rat-hat.list FINDSTR /I /M /S /B /C:"rat " /F:hat.list >> rat-hat.list FINDSTR /I /M /S /E /C:" rat" /F:hat.list >> rat-hat.list FINDSTR /I /M /S /C:" rat " /F:cat.list > rat-cat.list FINDSTR /I /M /S /B /C:"rat " /F:cat.list >> rat-cat.list FINDSTR /I /M /S /E /C:" rat" /F:cat.list >> rat-cat.list FINDSTR /I /M /S /C:" hat " /F:rat-cat.list > hat-rat-cat.list FINDSTR /I /M /S /B /C:"hat " /F:rat-cat.list >> hat-rat-cat.list FINDSTR /I /M /S /E /C:" hat" /F:rat-cat.list >> hat-rat-cat.list Within my test files, it still doesn't find all instances.
  10. Sh4dow

    Batch File!

    Remember what I am trying to accomplish is not to find a single word, but 2 or 3 of the words within a file then report which files those 2 or 3 words are in. No matter which way I try, I cannot script a solution that works yet Another question. What if the words are not in that order? Will that make a difference? I have 3 test files that read: test1.txt "The cat is named garfield. He is a fat cat." test2.txt "The cat likes to wear a funny hat." test3.txt "The fat cat who likes to wear a funny hat ate the skinny rat." I feel like Dr. Suess!
  11. Sh4dow

    Batch File!

    The above post gets to line 10 and hangs. I then receive errors: FINDSTR: /: ignored FINDSTR: /h ignored FINDSTR: /a ignored FINDSTR: /t ignored FINDSTR: /. ignored FINDSTR: /t ignored Nothing happens after that, I think it's stuck in a loop?
  12. Sh4dow

    Batch File!

    Purewaveform, not only did you greatly assist me, but I've learned something new. Thank you very much for all of your time.
  13. Sh4dow

    Batch File!

    Ok, I think it's like this: FINDSTR /I /M /S /C:" rat " *.txt > rat.list FINDSTR /I /M /S /C:" hat " *.txt > hat.list FINDSTR /I /M /S /C:" cat " *.txt > cat.list Then to compare the files to see if it contains 2 or 3 of the words I came up with this: FINDSTR /I /M /S /F:rat.list rat > rat-hat.list FINDSTR /I /M /S /F:hat.list hat > rat-cat.list FINDSTR /I /M /S /F:cat.list cat > hat-cat.list ??
  14. Sh4dow

    Batch File!

    in order to compare the files, would it be the same code I used before just modifying the words. For ex) FINDSTR /S /L /M /F:rat.list rat > rat-hat.list Is that correct?
  15. Sh4dow

    Batch File!

    FINDSTR /s /l /m "rat" *.txt > a.list FINDSTR /s /l /m "hat" *.txt > b.list FINDSTR /s /l /m "cat" *.txt > c.list FINDSTR /S /L /M /F:a.list rat > a-b.list FINDSTR /S /L /M /F:b.list hat > a-c.list FINDSTR /S /L /M /F:c.list cat > b-c.list Do I need the Quotation marks in the first 3 lines ex) "rat" Now I have a new set of problems. I made 3 test files, called test1, test2, test3. In these files I have 1 of the words, 2 of the words, then all three of the words. This script is finding words such as eduCATion and tHAT. I do not want it to do that. I need this script to find an exact match of 2 or 3 of the words in any combination then tell me which files contain those matches. =/ This is going to require much more work. Any hints or suggestions would be GREATLY appreciated!!
  16. Sh4dow

    Batch File!

    I'm having problems still. <~~~worst coder EVER! ok here goes: FINDSTR /s /l /m rat *.txt > a.list FINDSTR /s /l /m hat *.txt > b.list FINDSTR /s /l /m cat *.txt > c.list C:\>FINDSTR /S /L /M /F:a.list b > a-b.list C:\>FINDSTR /S /L /M /F:a.list c > a-c.list c:\>FINDSTR /S /L /M /F:b.list c > b-c.list ????????
  17. Sh4dow

    Batch File!

    Thank you for your assistance. I will get to work on it
  18. Sh4dow

    Batch File!

    I need a batch file that will look inside of files for certain words: hat, cat, rat It can be 3 different searches, but must report the file name if it has TWO of the words. It can have all 3 of the words as well. I know this is probably easy, but I've never written a batch file before. Can anyone assist me? Thank you!
  19. http://support.microsoft.com/?kbid=231289 I found it
  20. Hello everyone, I'm new to the forums. I see a lot of great information here and I was hoping that I could get some advice on my current situation. I would like to restrict users from using their a: and d: (any media drive). I want to do this with permissions so that my techs and admins can use the drives if they need to, however specific users cannot. Is this as simple as just creating a share on the workstation A$ and setting up permissions? If so, do I need to remove the everyone group and then add the users I want? I hope these questions aren't too n00b for everyone =/ Thank you in advance for any solutions and advice.
×
×
  • Create New...