Sign in to follow this  
Followers 0
adamsj13

User profile

4 posts in this topic

Hi all,

When I'm tring to create a little back up script I can get it to work fine for my id, here is what the code looks like now

msgbox(1, "Backup", "Once Complete another Message will appear")

DirCreate("h:\backup\lotus\notes\data")

DirCreate("h:\backup\desktop")

DirCreate("h:\backup\favorites")

DirCreate("h:\backup\passport")

sleep(10000)

DirCopy("C:\Documents and Settings\%userid%\desktop", "h:\backup\desktop", 1)

DirCopy("C:\Documents and Settings\%userid%\favorites", "h:\backup\favorites", 1)

FileCopy("C:\program files\lotus\notes\notes.ini", "h:\backup\lotus\notes")

FileCopy("C:\program files\lotus\notes\data\*.nsf", "h:\backup\lotus\notes\data")

FileCopy("C:\program files\lotus\notes\data\*.id", "h:\backup\lotus\notes\data")

FileCopy("C:\program files\lotus\notes\data\*.dsk", "h:\backup\lotus\notes\data")

Where it has %userid%, I would like to have it for the current user signed on to the system. What would I need to put there?

Thanks all for your help

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Where it has %userid%, I would like to have it for the current user signed on to the system. What would I need to put there?

%userid% is a windows/dos variable. AutoIT's equivalent is @UserName.

DirCopy("C:\Documents and Settings\" & @UserName & "\favorites", "h:\backup\favorites", 1)

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

hi,

you can also do this...

DirCopy(@DesktopDir, "h:\backup\desktop", 1)
DirCopy(@FavoritesDir, "h:\backup\favorites", 1)

New to script...But getting the hang of it.

Share this post


Link to post
Share on other sites

Yep, check out the macro's in the helpfile for best results.

FileCopy("C:\program files\lotus\notes\data\*.dsk", "h:\backup\lotus\notes\data")

FileCopy(@ProgramFilesDir & "\lotus\notes\data\*.dsk", "h:\backup\lotus\notes\data")

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  
Followers 0