; ===========================================================================================
;
; Script Information
;
; Title:
; Author: Wim Rotty
; Date:
; Description: Find all directories wit "&" and rename them
;
;
; ===========================================================================================
;;;;;;;;;;;;;;;;;;
; Script Options ;
;;;;;;;;;;;;;;;;;;
If Not @LOGONMODE
Break On
Else
Break Off
EndIf
Dim $RC
$RC = SetOption("Explicit", "On")
$RC = SetOption("NoMacrosInStrings", "On")
$RC = SetOption("NoVarsInStrings", "On")
If @SCRIPTEXE = "KIX32.EXE"
$RC = SetOption("WrapAtEOL", "On")
EndIf
;;;;;;;;;;;;;;;;;;;;;
; Declare variables ;
;;;;;;;;;;;;;;;;;;;;;
Dim $Dirs
Dim $Dir
Dim $Path
Dim $Options
Dim $StringToFind
;;;;;;;;;;;;;;;;;;;;;;;;
; Initialize variables ;
;;;;;;;;;;;;;;;;;;;;;;;;
$Path = "C:\Program Files"
$Options = "/AD /S"
$StringToFind = "Windows" ; $StringToFind = "&"
;;;;;;;;
; Code ;
;;;;;;;;
$Dirs = DirPlus($Path, $Options)
For Each $Dir in $Dirs
If InStr($Dir.Name, $StringToFind)
? $Dir.Drive
? $Dir.Name
? $Dir.ParentFolder
? $Dir.Path
?
; I presume
; $RC = $Dir.Move()
; can help
EndIf
Next
;;;;;;;;;;;;;;;;;;;;;;;;
; Personal UDF Section ;
;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;
; UDF Section ;
;;;;;;;;;;;;;;;
; Paste the DirPlus() Function here
; You can find it at
; http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=82153