ok, I'm using Add-Content to fill txt file, and that works great.
However, I'm faceing the next problem: last line can't be blank line (swf
file (SWIFT standard)). So, I need exeption for the last Add-Content command.
Help please.
ok, I'm using Add-Content to fill txt file, and that works great.
However, I'm faceing the next problem: last line can't be blank line (swf
file (SWIFT standard)). So, I need exeption for the last Add-Content command.
Help please.
MiroslavK wrote:
> ok, I'm using Add-Content to fill txt file, and that works great.
> However, I'm faceing the next problem: last line can't be blank line (swf
> file (SWIFT standard)). So, I need exeption for the last Add-Content command.
> Help please.
I'm assuming you're using a script? Can you just do a final add-content
file "" at the end of your script?
Might need more details...
Marco
"Marco Shaw" wrote:
>
> I'm assuming you're using a script? Can you just do a final add-content
> file "" at the end of your script?
>
> Might need more details...
>
> Marco
>
I don't understand.
Last line in my script is:
Add-Content "-}"
However, I'm getting swf (txt) file with end of file like this:
....
....
....
-}
(blank line)
and "}" char need to be LAST char in the file.
Try this
[io.file]::AppendAllText('my.txt', '-}')
--
Thanks,
Roman Kuzmin
"Roman Kuzmin" <z@z.z> wrote in message
news:OdkIFEUoHHA.4120@TK2MSFTNGP06.phx.gbl...
> Try this
> [io.file]::AppendAllText('my.txt', '-}')
>
It sure would be nice if Add-Content had a -NoNewline parameter.
--
Keith
"Roman Kuzmin" wrote:
> Try this
> [io.file]::AppendAllText('my.txt', '-}')
>
> --
> Thanks,
> Roman Kuzmin
tnx, thats it!
"Keith Hill [MVP]" wrote:
>
> It sure would be nice if Add-Content had a -NoNewline parameter.
>
> --
> Keith
great idea.
| Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to read the LAST NON-BLANK line from a text file? | Tony Bansten | VB Script | 18 | 18 Mar 2009 |
| Blank uneditable Subject Line | No One | Vista mail | 6 | 28 Dec 2008 |
| Read a line from a text file, without loading the entire file inmemory | Personne | PowerShell | 7 | 13 Dec 2008 |
| How do I defeat Spam with a blank Subject Line? > as such >> | Kaiser | Vista mail | 6 | 08 May 2008 |
| reading a big file line by line to be "out of memory" safe | freddy chavez | PowerShell | 8 | 02 Aug 2007 |