ödipush Posted March 17, 2010 Posted March 17, 2010 Hey guys. I am trying to find a way to copy all Windows Live Messenger logs onto a USB-drive, but I've run into some problems: The default directory for saving logs are: %USERPROFILE%\Recieved Files\[Name of email + random numbers]\History So i was wondering whether I could check all folders in %USERPROFILE%\Recieved Files for a subfolder named "History", and then copy that folder? My problem is, that I'm not quite sure what the name of the email and these random numbers are, but I know for certain, that there will be a "History"-folder inside the unknown folder. //ödipush Quote
ödipush Posted March 17, 2010 Author Posted March 17, 2010 Allright, I've been digging further. It seems like I can use the "DIR /S"-command to dump a list of all directories and their subfolders. Right know I got this: dir /S "%USERDATA%\Documents\Recieved Files">"%~d0\Backup\LogList.txt" Now I need a way to automatically look trough "LogList.txt" and find a way to navigate to the folder that contains a folder named "History" In Linux it would be possible to use "|grep" but it seems like that option doesn't exist in Windows? Semirelated: Would it be possible to use wildcards in a .bat-file, and find the folder that way? Quote
Infiltrator Posted May 16, 2010 Posted May 16, 2010 (edited) Allright, I've been digging further. It seems like I can use the "DIR /S"-command to dump a list of all directories and their subfolders. Right know I got this: dir /S "%USERDATA%\Documents\Recieved Files">"%~d0\Backup\LogList.txt" Now I need a way to automatically look trough "LogList.txt" and find a way to navigate to the folder that contains a folder named "History" In Linux it would be possible to use "|grep" but it seems like that option doesn't exist in Windows? Semirelated: Would it be possible to use wildcards in a .bat-file, and find the folder that way? Hi ödipush, Try using the following command to search through a single file. type <filename> | find "keywords" Edited May 16, 2010 by Infiltrator Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.