Write Results From 2 Separate Files To One Log File Via .bat?
May 31, 2012
I am in need of assistance. I have a batch file that runs nightly to restart machines in a specified list (restartmelist.txt) which works flawlessly. What I am looking to do, is have another file (restartmenames.txt) with a list of usernames, so when I look at the results file, I can not only see the results from each machine, but also whose machine it is. The names correlate in order with the machines. So restartmelist.txt looks like this:
MACHINE1
MACHINE2
MACHINE3
And restartmenames.txt looks like this:
Bob Lastname
Bill Lastname
Jason Lastname
Right now, my log-file writes like this:
.Machine1
.Machine2
.Machine3
What I would like to see, is this:
.Machine1 (Bob Lastname)
.Machine2 (Bill Lastname)
.Machine3 (Jason Lastname)
What I don't know how to do, is call that 2nd file to write the log entries, or if it's even possible. Here is what my code currently looks like:
Code :@ECHO OFFFOR /F "tokens=*" %%A IN ('TIME/T') DO SET Now=%%A>>c:scriptsRestartme.log 2>&1 Echo Restarting of machines STARTED on %date% @ %now%>>c:scriptsRestartme.log 2>&1 Echo.set _=c:scripts
estartmelist.txtfor /f %%i in (%_%) do (>>c:scriptsRestartme.log 2>&1 SHUTDOWN /r /m \%%i /t %1 /c "This machine is forcibly restarting in %1 seconds!" /f>>c:scriptsRestartme.log 2>&1 Echo . %%i)FOR /F "tokens=*" %%B IN ('TIME/T') DO SET NowDone=%%B>>c:scriptsRestartme.log 2>&1 Echo.>>c:scriptsRestartme.log 2>&1 Echo Restarting of machines COMPLETED on %date% @ %nowdone%>>c:scriptsRestartme.log 2>&1 Echo ------------------------------------------------------------------>>c:scriptsRestartme.log 2>&1 Echo.Copy c:scriptsRestartme.log \seaappsappslogfiles /y
View 12 Replies
ADVERTISEMENT
Oct 29, 2010
I tried to run this simple copy batch file and get no results. copy "c:aquariumaqrabases*.*" "N:"
View 4 Replies
View Related
Sep 29, 2011
I went thru this with Vista, don't remember what the solution was..when search for a file by typing file name (or partial file-name (or extension)) in search field in folder window.. the results don't tell you where the files arewhat is the purpose of a search functionality if results don't display file-locations???I think in Vista I was able to tell it what cols to display in results (and I think there was one that displayed locations.. why it doesn't default to this I cannot fathom, but well...;-) but don't see how to do this in Win7
View 1 Replies
View Related
Jun 3, 2012
I didn't used to have this problem before. For some unknown reason, all my video files have a separate PNG file next to it with a picture of the thumbnail. I don't remember changing any viewing options that may have triggered this.
View 2 Replies
View Related
Sep 28, 2012
Brand new computer, upon installing Windows 7 could not boot into windows due to missing file errors. The HDD I am trying to install onto is a SSD, I will provide system specs at the end of the post. Anyway I unplugged my secondary SATA hard drive and then I was able to install Windows 7 and boot into windows.Now after all my drivers have been installed I am recieving error messages when logging into Windows. I ran SFC.exe and the log output gave me hundreds of lines saying Cannot repair member file. Here is an example:
2012-09-27 20:28:38, Info CSI 00000116 [SR] Cannot repair member file [l:24{12}]"fpcmbase.sys" of avmx64c.inf, Version = 6.1.7600.16385, pA = PROCESSOR_ARCHITECTURE_AMD64 (9), Culture neutral, VersionScope = 1 nonSxS, PublicKeyToken = {l:8 b:31bf3856ad364e35}, Type = [l:24{12}]"driverUpdate", TypeName neutral, PublicKey neutral in the store, hash mismatch
[code]....
I have tried re-formatting again only to have the same issue. Maybe it has something to do with me trying to install onto the SSD drive? I have not yet tried installing windows onto just the SATA HDD I have and disconnecting my SSD.
System Specs:
Intel Core i7 3930k Processor
ASUS P9X79
32GB [4GB x8] DDR3-1600 G.Skill Ripjaws X
NVIDIA GeForce GTX 670 - 2GB - EVGA Superclocked - Core: 1046MHz
240 GB Corsair Force Series GT SSD
2TB Hard Drive 7200rpm
View 1 Replies
View Related
May 29, 2012
I have followed the instructions to search for files in Windows 7 but have found the process very slow and the results bring up lots of irrelevant files. Find a file or folder. By comparison the search companion on XP was much faster and got more relevant results based on file name. If that didn't work there was the option of searching for text within the file. For example I know inside a folder there is a sub folder with the file I am looking for and I know part of the name. Is there a way to make Win 7 search for results based only on the file name? In most cases that would be a lot simpler. Otherwise win 7 will look in the contents of the file which is a time waster.
View 9 Replies
View Related
Jul 28, 2012
I want to know how to search for? and have the results returned be those of only file names.
View 1 Replies
View Related
Mar 12, 2011
see how in this picture: http://res2.windows.microsoft.com/re...10ab536484.jpg, in the search results, if the searched word is found inside a file, a few lines of text are show with the word highlighted. i'm using windows 7 and this does not happen for me. if a word is found in file contents, i'll get it listed in the results, but it won't show me the context of it like in the picture.
View 2 Replies
View Related
Mar 31, 2011
I don't know why Microsoft made this so difficult in Windows 7 / Server 2008..I use the Windows Advanced search to find files containing a certain word, it pulls up a list of results... I can "select all" and I can do things like copy them to another location, but I CAN'T find a way to delete these files!!If I click the DELETE key while they are all selected, nothing happens. It's not allowing me to drag the files into the Recycle Bin.Am I missing something here? It seems that all options that are normally available when right-clicking on file(s) are present in the right-click menu (open with, send to, create shortcut, etc) EXCEPT for cut or delete.
View 2 Replies
View Related
Jul 9, 2012
there is a file on my computer that i have to find unfortunately, it's a .jpg file if i run a search on my computer for *.jpg i'm obviously going to get a ton of files i'm trying to figure out a better way to do this if i sort the search results by folder, i can get some separation, but if i delete those folders out of my search results window, won't it delete the actual files as well?
View 1 Replies
View Related
May 27, 2012
How can I save the search result in a text file that can be read by Notepad for example?
View 4 Replies
View Related
Oct 22, 2012
In my case the search does not work for any user profile! From the search programs and files when I type in a command or program name here's what I get blank icons "programs, control panel, documents, Microsoft Outlook, Files" If I press on one of them I recieve a pop up saying "These files can't be opened. Your internet security settings prevented one or more files from being opened". If I press on the "search more results" then the search I'm looking for is found, which in my opinion search and indexing is working from within explorer but not from within the "search programs and files" from the start Menu. Fromm within Outlook 2010 I'm also able to locate any email easily.
Here are the list of things I tried so far.
- Don't have or can't find so I couldn't delete the following key "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerFolderTypes{EF87B4CB-F2CE-4785-8658-4CA6C63E38C6}TopViews{00000000-0000-0000-0000-000000000000}
- Deleted indexing and created it again.
- I cannot restore PC to a previous state as I do not have any restore points
- Search does not work in safe mode either
- search is enabled under Windows Features
- Search service is running
- Installed these 2 hotfixes KB2268596-x64 and Windows6.1-KB977380-x64
View 1 Replies
View Related
Apr 30, 2009
So after 0 signs of problems I restart the computer and get the bsod after windows loads everytime. I decided to order a new hdd and i'm going to install 7000 on it so I can download 7100 on it next week. I decided to try putting windows on a seperate partition but I have a couple questions and concerns. First, is there a way to seperate the file system (program files, documents, etc.) so that I can install into these places. Because I'd still like to have the start menu programs and also, many programs just automatically install things into my documents automatically and I don't want anything other than drivers and system files on the partition so it doesn't become fragmented. Is there any way these issues can be addressed?
View 4 Replies
View Related
Aug 30, 2011
how to put favorites into a separate file or folder
View 1 Replies
View Related
Dec 9, 2009
I was wondering how to for example, make a program work, while it is using its core files on another file.
Example: I have a Fast HD with limited space, and i have a slow HD with lots of space.
Now, i have a program that in its folder has Core file, Videos file and .exe
If i remove one of them, it stops working. I want only core file to be on the fast HD while i want the other files running at the slow HD. How do i do that?
Long story short : I want a program to run with its files running on separate HDs.
I have many purposes to do that, since i have programs, games that i want to run faster, and mainly games have files like Videos, etc that doesn't need to be on a fast HD.
View 2 Replies
View Related
Aug 5, 2012
I was just recently moving some of my files from My C drive to E. It was all going smoothly as I had done it before but, this time instead of copy and pasting I dragged and dropped the files over. I was doing this to cut down space on my C drive, to my surprise though I saw it was increasing (drive C) by every file I had put on E. I would like to know if I had done something wrong or what happened I started at 148GBs stored and it increased to 156GBs. If it helps I was moving games from my x86 program files.
View 3 Replies
View Related
Aug 28, 2012
I have got two separate hard drives one running Windows 7 one running xp. I need to be able to chose which os to run but currently I can only do so by pressing F12. I have tried EasyBCD but it wont work - does anyone know how I can do this?
View 1 Replies
View Related
Feb 18, 2012
I began having an issue with my laptops ATI Radeon graphics driver not working properly. It is fixed now, but the other issues I was having at the same time was not being able to view indexed files through the "search programs and files" and "windows explorer search" box. The screen goes blank or does not produce any results. Also, one of my downloaded software disk programs will not open--error. This particular program, Logos Bible software, index its files quite often. Even when I am not using the program. I also cannot change my desktop background to any picture except solid colors. I think my laptop has a corrupted file somewhere, or it is infected with malware.
View 1 Replies
View Related
Feb 2, 2011
When I try to install my new Kensington USB Display Adapter(sort of a video board) on my recent (2 weeks old) Lenovo "ideaCentre B3" computer I get this error msg. "Error opening installation log file. Verify that the specified log file location exists and is writable."
Windows7 home Premium, 64 bit
Kensington said download new "Setup.exe" file when that gave same error, they said not our problem go away. also tried run as admin - same problem!
Lenovo said software is not under warranty it will cost a lot of money to troubleshoot - call microsoft.
Microsoft said this is an OEM product call Lenovo.
View 1 Replies
View Related
Sep 30, 2012
I'm trying to write a request to COM2 and capture the answer. My device is 19200 baud 8/1 non parity.Using a freeware terminal called termite I can send the hex instruction and receive the answer, as verified in HHD serial monitor.My batch file looks like this: Code: MODE COM2: baud=19200 parity=N data=8 stop=1 to=offTYPE request.txt>COM2COPY COM2 text.txt where request.txt contains my request.HHD sees the request being written, but the device does not respond.
View 9 Replies
View Related
Jun 22, 2011
I do a lot of internet troubleshooting and would like to put a simple batch file in customers computers that will let me see their DNS numbers when they are using a router.I currently do this from a command prompt for Comas.
View 9 Replies
View Related
Nov 14, 2011
I am trying to copy .ISO file from HDD to USB drive, but this file is write protected.How to remove write protection from .ISO file?
View 6 Replies
View Related
Oct 16, 2012
i just installed a new premium theme called hud apocalypse. i love the theme except it kinda erased my shutdown/restart/logoff/switchuser default from the start menu.I was able to write a batch file to shutdown. this is the code in the batch file c:windowssystem32shutdown -s -f -t 000..i've done a lot of google searches and alot of them say to restart via batch file and the command is Shutdown -r but this just shutsdown the computer and doesn't reboot.
View 3 Replies
View Related
Oct 25, 2012
I have some programs that need to write to DAT files located in the -->AppDataRoaming directories for each specific program but when they want to make these writes they are denied access and an Access is denied error message is returned (see attachment). I'm using Windows7. Anyone know what I can do to rectify this?
Tech Support Guy System Info Utility version 1.0.0.2
OS Version: Microsoft Windows 7 Ultimate, Service Pack 1, 64 bit
Processor: AMD A6-3500 APU with Radeon(tm) HD Graphics, AMD64 Family 18 Model 1 Stepping 0
Processor Count: 3
RAM: 16363 Mb
Graphics Card: ATI Radeon HD 4650, 1024 Mb
Hard Drives: C: Total - 953866 MB, Free - 788112 MB; E: Total - 953868 MB, Free - 190025 MB; F: Total - 953866 MB, Free - 18578 MB; G: Total - 1907728 MB, Free - 82515 MB;
Motherboard: ASRock, A75 Pro4
Antivirus: avast! Antivirus, Updated and Enabled
View 7 Replies
View Related
May 16, 2012
Was infected by the matsnu1 virus recently which encrypes and locks all your data files. Got all my files back by running matsnu1decryp.exe You need an original clean file before the virus struck for it to work out how to decrypt all your other files does does save the day. Down side is that you end up with two files. The the original and a locked version. You can just go through your hard drive and delete the locked files but I have a 1TB disk with thousands of files and folders.
Since all the locked files begin with "locked" I was wondering about some sort of batch file that would do this for all folders and sub folders. I am sure I remember doing this stuff years ago with DOS but don't remember enough to try it. Any DOS command for this or some other way of quickly deleting many files which have part of the name which is common to all files. They all have different extensions so cannot use that option. My drive is H:
View 6 Replies
View Related
Jan 3, 2012
i cant copy the files to USB !! It show the hard disk is write Protected!! What Should i do!
View 1 Replies
View Related
Sep 19, 2012
I recently reformatted my hard disk and re-installed Windows 7, and when I try to edit any files in the subdirectories off any on the directories in the C:Program Files directory, I get 'protected' errors. I found that I could not create files or edit files anywhere below these directories.It turns out that everything in the Program Files folder and below is write protected. I tried changing one of the subfolder's properties and marked everything as Not Read-only, but I still couldn't create/edit files there.I was running Windows 7 before the hard disk crapped out, and I was able to modify the au3.propertied file with no problem.I know that Microsoft wants to put all data files in the C:User... directories, but the program I'm trying to change is AutoIt (SciTE), and I don't think here's a way to change the location of the properties files.I Googled in the Windows 7 support site and found a link to a video telling how to work around this. You have to change permissions of the parent folder and all files/folders below it.
View 4 Replies
View Related
Oct 31, 2011
I have my 2 PC's networked in a Homegroup. 1 is running Win 7 Home Premium 64, the other Win 7 Ultimate 32. I want to write to the Program Files folder on the 32 bit system from the Program Files (x86) folder on the 64 bit system. All other read/write operations between these 2 systems are succeeding. I have set up full permissions on both Program Files folders exactly as with other folders: Properties > Sharing > Advanced Sharing > Share this folder > Permissions > Full Control for "Everyone". I suspect UAC may be intervening. Is there any way to defeat this? My final objective is to automate synchronization between a few selected areas in these Program Files using my backup utility, SyncBackSE. It kept failing based on access denied, so I tried to drag & drop manually via windows explorer, and this is also not allowed. don't focus on questions about SyncBackSE - I am seeking help getting permission to move & change files via explorer.
View 5 Replies
View Related
Oct 16, 2012
how to delete write protected files on multimedia optical drive
View 3 Replies
View Related
Oct 30, 2010
How to create a batch file that will move files based on the file type?My Requirement : I need a batch file to copy all .doc files in all my HardDisk to aremovable disk say (Z: drive) . Can anyone make it possible using a batch file
View 4 Replies
View Related
Dec 2, 2011
My memory card is write protected. I can't copy any files from computer to memory card. How it can be removed from write-protection.
View 1 Replies
View Related