The Sub elements are not properly terminated. It should be.
<Sub Report="BusinessSummarySubs" EMails="lalla@yahoo.com; haha@yahoo.com"/>
Does the number of email addresses in the XML file correspond to the number of lines in the txt with the @VARIABLE string? Or do you want to concatenate all...
@strongm
Good option! It has been weeks since I worked on this. As far as I can remember, the original poster also wants the blank lines removed from the original file.
Blank lines in the original file are not skipped. To do so, update the following line.
If r.Test(TextLine) = False Then
To
If r.Test(TextLine) = False And Len(TextLine) > 0 Then
Again, please test thoroughly before you deploy.
I doubt if that can be accomplished from within the script. If I were to venture a solution, I would write another script that calls this script. See an example here.
You don't need to create the file in the etc folder. I don't even think it's a good idea. Since the file is simply a way to check if the service file was edited, I recommend creating the service.ack file in a temp folder. Afterall, the file won't be missed after your project is complete. So...
Here is another option using regular expressions.
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Check if the service.ack file exist. If it does then stop the execution as the script already ran.
If objFSO.FileExists("C:\Windows\System32\drivers\etc\service.ack") Then
WScript.Echo...
You're welcome. In regards to your follow-up question, there are no wildcards for what you are trying to accomplish. Can you give an example of what you are trying to accomplish with going through each subfolder and files. Take care.
PLEASE disregard my previous post and use this.
Call DeleteFiles("C:\FTPdata","dat",15)
Call DeleteFiles("C:\mobileiron","tgz",2)
Call DeleteFiles("C:\block\PRIME","gpg",2)
Call DeleteFiles("C:\block\ISE","gpg",2)
Sub DeleteFiles(Path,Ext,n)
Set oFSO =...
Here is a cleaner way to do this.
Call DeleteFiles("C:\FTPdata",15,"dat")
Call DeleteFiles("C:\mobileiron",2,"tgz")
Call DeleteFiles("C:\block\PRIME",2,"gpg")
Call DeleteFiles("C:\block\ISE",2,"gpg")
Sub DeleteFiles(Path,Ext,n)
Set oFSO = CreateObject("Scripting.FileSystemObject")
For Each...
Hi All,
I just wrote a vbscript that uploads files into a shared folder. It works. The problem is that the default state of these files is "Check Out". So I have to manually select these files on the front-end to "Check In". This I believe defeats the purpose of my script. Is there a way...
This should work...
Dim arr(6,5) 'The first dimension is the number of lines in your input file and the second is the number of fields - 1.
InFile = "<PATH TO YOUR INPUT CSV FILE"
OutFile = "<PATH TO YOUR RESULT FILE>"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set InF =...
That is weird as it's not happening on my end. Tried it with both WinXP and 7. Does it happen to any other dialog boxes or windows?
Going back to your original post, another option that I could think of to make your "Save As" project elegant is to use HTA.
This is probably as close to "Save As" as you can get.
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("Shell.Application")
Path = oShell.BrowseForFolder(0,"Choose Folder",0,17).Items.Item.Path
Name = InputBox("Please Enter A FileName",,"FileName.txt")
If Path...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.