Content Type
Profiles
Forums
Events
Everything posted by Yzöwl
-
RoboCopy will not delete anything from your destination unless you use one of the following switches, /PURGE, /MIR, /MOV or /MOVE. If you do not want to copy any directories, only files, then do not use the /S or /E switches. If you wanted to action only the top level of files, i.e. 0 LEVels of directory, then you could simply use /LEV:0 If you wanted to eXclude specific Directories from being actioned, then use /XD followed by the directory name(s).
-
Count down in a batch file
Yzöwl replied to sixpack's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
…also please be aware that choice is not available by default in all OS's. -
Moderator 'note to all' Further discussion around bypassing the Developer's controls will result in Moderator action, including banning Members. If you do not like the controls, then do not use the program!
-
Okay, before the tests go any further, I think we need to be sure what your intentions are. If you are overwriting with the backup set taken on 2nd October then all of these switches may be pointless. It just depends upon when you believe the files became corrupted. Robocopy by default will overwrite all existing files in the destination if the source file size or time stamps are different. It doesn't care whether the destination file is older or newer, larger or smaller, if it is different then it will be overwritten by the source file. You should theoretically get away with this: ROBOCOPY "C:\Path to my files" "X:\Path to destination" /L /S /COPY:DATS /XL /W:5It should replace every file on the production server which has changed since the backup set was created with that backed up file. I have included the /XL switch to prevent files and directories which no longer exist on the production server from being copied back to it, (they may have been deleted for valid reasons). Remember the /L switch will need to be removed when you're happy with the listed output.
-
Ping utility GUI
Yzöwl replied to stak1993's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
If you can use Powershell, this submission from last year may provide inspiration. [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") $Form = New-Object System.Windows.Forms.Form $Form.Size = New-Object System.Drawing.Size(600,400) $Form.StartPosition = "CenterScreen" #loads the window in the center of the screen$Form.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::FixedToolWindow #modifies the window border$Form.Text = "Ping GUI tool" #window description############################################## Start functionsfunction procInfo {$computer=$DropDownBox.SelectedItem.ToString() #populate the var with the value you selected$pingResult=ping $computer | fl | out-string;$outputBox.text=$pingResult } #end procInfo############################################## end functions############################################## Start drop down boxes$DropDownBox = New-Object System.Windows.Forms.ComboBox$DropDownBox.Location = New-Object System.Drawing.Size(20,50) $DropDownBox.Size = New-Object System.Drawing.Size(180,20) $DropDownBox.DropDownHeight = 200 $Form.Controls.Add($DropDownBox) $wksList= Get-Content .\servers.txtforeach ($wks in $wksList) { $DropDownBox.Items.Add($wks) } #end foreach############################################## end drop down boxes############################################## Start text fields$outputBox = New-Object System.Windows.Forms.TextBox $outputBox.Location = New-Object System.Drawing.Size(10,150) $outputBox.Size = New-Object System.Drawing.Size(565,200) $outputBox.MultiLine = $True $outputBox.ScrollBars = "Vertical" $outputBox.Font = New-Object System.Drawing.Font("Verdana",8,[System.Drawing.FontStyle]::Italic)$Form.Controls.Add($outputBox) ############################################## end text fields############################################## Start buttons$Button = New-Object System.Windows.Forms.Button $Button.Location = New-Object System.Drawing.Size(400,30) $Button.Size = New-Object System.Drawing.Size(110,80) $Button.Text = "Ping" $Button.Add_Click({procInfo}) $Button.Cursor = [System.Windows.Forms.Cursors]::Hand$Button.BackColor = [System.Drawing.Color]::LightGreen$Button.Font = New-Object System.Drawing.Font("Verdana",14,[System.Drawing.FontStyle]::Bold)$Form.Controls.Add($Button) ############################################## end buttons$Form.Add_Shown({$Form.Activate()})[void] $Form.ShowDialog()The above is taken directly from episodes one and two of the fore-mentioned submission with the only change being the array which is populated from your local file, servers.txt. -
As jaclaz suggests above, robocopy is the current built in tool for the job. You will need the /MAXAGE switch using 3rd October 2013, (/maxage:20131003), for the permissions you may find the /COPYALL switch best, since the default for /COPY is DAT, (not DATS - jaclaz ), meaning that it will ignore the NTFS ACL as well as Owner and Auditing information.
-
Technically not, the Subject Title, "Loop 2 files…" and the following Since the original question has been solved, I will be closing this Topic. I would suggest that the OP uses the original solution, renames Result.txt and inputs that renamed file with File3.txt etc. until they have all 4, 5 or 6 files done. Alternatively copy each seperate file into a different spreadsheet column and output it as a .csv.
-
@bphlpt My solution only works if there are no blank lines, (especially in File 1). The disabling of delayed expansion was probably an OTT addition to protect the possibility of exclamaion marks in File1, you could very likely remove SETLOCAL DISABLEDELAYEDEXPANSION from line 7 and the corresponding ENDLOCAL from line 13. @ECHO OFFSETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION SET I1=File1.txtSET I2=File2.txtSET OF=Result.txtSET "DLM=,">%OF% (FOR /F "TOKENS=*" %%a IN (%I1%) DO (SET "I1_LINE=%%a" SET/P "I2_LINE=" ECHO:!I1_LINE!!DLM!!I2_LINE!))<%I2%Here's the powershell solution tidied a little. $x = Get-Content .\File1.txt$y = Get-Content .\File2.txt$i = 0; $x | ForEach-Object {($_, $y[$i]) -join ","; $i++}>Results.txtOnce again see Results.txt for your expected output and change the filenames at the end of lines 1 and 2 as necessary.
-
You could also try this! @ECHO OFFSETLOCAL ENABLEEXTENSIONSSET I1=File1.txtSET I2=File2.txtSET OF=Result.txtSET "DLM=,">%OF% (SETLOCAL DISABLEDELAYEDEXPANSION FOR /F "DELIMS=" %%a IN (%I1%) DO (SET "I1_LINE=%%a" SETLOCAL ENABLEDELAYEDEXPANSION SET/P "I2_LINE=" ECHO(!I1_LINE!!DLM!!I2_LINE! ENDLOCAL) ENDLOCAL)<%I2%ENDLOCALGOTO :EOFYour output will be found in the file defined at Line 5Change the filenames in Lines 3 & 4 to suit your actual input files.
-
Only you know where your setup file is, find it and replace C:\kes 10.1\en\exec with that location.
-
Try reading the pinned topics in this specific Forum, the relevant MSFN Unattended Forums and if necessary MSFN's Multi-Boot Forum. Topic Closed!
-
Moderator Note: This is a warning to all. I have removed all complaining posts and pointless bloat from this Topic. (Almost ⅓ of Topic total) If you don't like the way that the Developer has decided to nag for donations, don't install it and complain here. If posts are removed and you complain about it, as stated in the rules the board Moderators may take action against you.
-
-
Here's an all in one version incorporating the DWM restart and the Run As check. Aero_Reg.cmd Hope it helps.
-
Here's a slightly different version, which checks for the delimiter. Reg_Aero.cmd
-
bigmuscle, I think you may have meant existing data under AppInit_DLLs, because LoadAppInit_DLLs can only be 0 or 1. Additionally, unless it has changed since Win7, the dll full path data under AppInit_DLLs should be comma or space delimited and in short filename format. BTW, the Aaaaa REG command version above apart from the missing quotes as highlighted by DosProbie should also not be escaping backslashes.
-
SUM function with complications. Need help with formula.
Yzöwl replied to kbdavis's topic in Microsoft Office
It's a long time since I used excel, but it sounds to me as if you need to use the SUMIF function. Try this, based on your example and assuming ROW1 begins ABC100 and the currency symbols are added only as part of the cell format: =SUMIF(A1:A4,"ABC100",B1:B4) -
Will a recovery clean the hard drive
Yzöwl replied to mike13's topic in Malware Prevention and Security
The confusion may be because nobody here is exactly sure what the structure of the drives are and how the factory re-setting interacts with them. Any malware located anywhere other than the System Disk may not be removed by a 'factory restore'. I would say however that if I'd successfully run the scanners you've mentioned on a system that I'd need a much better reason to restore, wipe or re-install anything than you've given thus far. -
And there we are; the question you asked had nothing to do with a file, your posted scripts do not read from nor do they write to a file. Do not presume to know more than those off whom you require help, not only is it rude and prevents those people from providing you further help in future, it is also wrong, (your knowledge of the subject is unlikely to ever reach the level of some of our Members). BTW - just in case you are interested, here is a vbscript, place it along side your INDEX.HTML and double click it, the resulting REPLACED.TXT should be what you required. Const ForReading = 1, ForWriting = 2strScriptFile = Wscript.ScriptFullNameSet objFSO = CreateObject("Scripting.FileSystemObject")Set objFile = objFSO.GetFile(strScriptFile)strFolder = objFSO.GetParentFolderName(objFile)Set objFile = objFSO.OpenTextFile(strFolder & "\INDEX.HTML", ForReading)Do strLine = strLine & objFile.ReadLine & vbCrLf Loop While Not objFile.AtEndOfStreamobjFile.ClosestrLine = Left(strLine, Len(strLine) - 2)strLine = replace_char(strLine)If Not (objFSO.FileExists(strFolder & "\REPLACED.TXT")) Then objFSO.CreateTextFile(strFolder & "\REPLACED.TXT")End IfSet objFile = objFSO.OpenTextFile(strFolder & "\REPLACED.TXT", ForWriting)objFile.Write(strLine)objFile.CloseFunction replace_char(strRemove) Dim arrWrapper(1) Dim arrReplace(5) Dim arrReplaceWith(5) arrWrapper(0) = arrReplace arrWrapper(1) = arrReplace ' Replace arrWrapper(0)(0) = "&" arrWrapper(0)(1) = "?" arrWrapper(0)(2) = "<" arrWrapper(0)(3) = ">" arrWrapper(0)(4) = "!" arrWrapper(0)(5) = "|" ' With arrWrapper(1)(0) = "{#}" arrWrapper(1)(1) = "{##}" arrWrapper(1)(2) = "{###}" arrWrapper(1)(3) = "{####}" arrWrapper(1)(4) = "{#####}" arrWrapper(1)(5) = "{######}" For N = 0 To 5 strRemove = Replace(strRemove, arrWrapper(0)(N), arrWrapper(1)(N), 1, -1, 0) Next replace_char = strRemoveEnd Function
-
There's no larger script this time. The script posted above is the only one I tried to use on the HTML file but then realised that it didn't work with exclamation marks. That's why I posted the question Once again, this is a completely different thing than the other script about merging updates. It's got nothing to do with that. I'm writing a script to process a HTML file in order to remove some parts from it. I've got no other issues with it. I just wanted to ask whether it was possible to process exclamation marks with delayed expansion enabled but it seems that the simplest way to solve the problem will be just disable it and use CALL. Anyhow, thank you for the answer (post #3). The script you posted echoes replacements to the console window only, it most certainly does not remove parts of the html file. A html file without its opening and closing tag symbols isn't really a html file. You asked for help with a specific problem when the problem you had was something different. I gave you a solution to replace a single character in a single character string with three specific characters. You then rejected my solution because you'd decided not to inform us that you were intending to replace several different characters in an entire file with strings of varying lengths. Our Members do not have to be rocket scientists to see that the characters you were intending to replace were those which pose problems to batch script parsing, and that the process you posted if not currently part of a larger script is intended to be so. You are thinking through a task in small pieces without first looking at the entire picture. Whilst it may not be part of the merging .inf files topic, it certainly has the hall marks of taking light years to achieve a goal which could have been achieved quickly with the full information from the start.
-
If it helps, here is a QFE listing I've just done on one of my Vista x86 HP SP2 English systems. The unit only has a base OS with IE9, .NET Fw 3.5 SP1, and Silverlight. hotfixes.txt
-
GSM, you are very correct. You may notice that the file they are pretending to be their finished product is only a small portion of a much larger script. The characters they are replacing are only those which may pose further parsing in a batch file problems. I would be certain based upon the previous help they have received that the intention is to run this routine through to a holding file perform several other batch parsing operations on it then attempt to return the original characters back in later. Despite being aware VBS and small executables such as SED and GSAR and perhaps even lesser known ones like John Stockton's SUBS, tomasz86 is a windows 2000 user and is therefore unable to accept the easy way.