Jump to content
Sign in to follow this  
inthewayboy

Create Temporary TXT Files

Recommended Posts

inthewayboy

I'm trying to impliment exmerge in our exchange 2003 backup scheme, just for those few people who require extra data protection. I've currently gotten a basic script that calls exmerge.exe with the correct exmerge.ini and other supporting TXT files. However, this means I have to a unique files for each user.

So what I was looking to do is have a single script that would not only perform the actual exmerge execution, but would also create the necessary files before that. Of course the real power of this would come in the form of a UDF, which I'm looking forward to testing over the weekend. But I have no clue as to how to attack the TXT files.

My first thought was to establish a 'temp' working directory...the script would create the necessary files in that location, then run the exmerge process, and finish up with deleting the files and the 'temp' working directory.

But I can't help but think there is an easier way. The text files are really simple...one tells exmerge which file store to work with, the other tells it which mail boxes to work with...in both cases it's just a single line of text, two if you include the 'header' that exmerge puts in the files when it creates them (Don't think they are required, but you never know).

Any tips or suggestions on how to handle this? I'm really not used to interacting with files like this, so any help would be appreciated. and please, don't hesitate to give an example :)

I've attached the files I'm currently using, edited to protect the innocent (And you can't upload .ini files?)...I would hope it's not too hard to follow. And I would be shocked if I was the only exchange admin on here...thanx in advance!

databases.txt

mailboxes.txt

exmerge.au3

exmerge.ini.txt

Share this post


Link to post
Share on other sites
DaleHohm

check out:

_TempFile

--------------------------------------------------------------------------------

Generate a name for a temporary file. The file is guaranteed not to exist yet.

#include <File.au3>

_TempFile ( [ $s_DirectoryName=@TempDIr [, $s_FilePrefix [, $s_FileExtension [, $i_RandomLength ]]]] )

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.