Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I am trying to write a batch file that will backup a Lotus notes ID file and an address book to a server. The backup code is quite simple, just:
"xcopy "C:\Program Files\Lotus\Notes\Data\*.id" P:\Notes Backup/y"
and
"xcopy "C:\Program Files\Lotus\Notes\Data\names.nsf" P:\Notes Backup/y"
However, since I"ll be backing up about 100 names.nsf files, I want to include the id filename in front of the "names.nsf" so for example, if the files to backup were jsmith.id, and names.nsf, I'd like to output the files as jsmith.id and jsmithnames.nsf.How would I go about combining those names?

The untested, non-script version:
for %a in ("C:\Program Files\Lotus\Notes\Data\*.id") do (copy /y "%~Fa" "P:\Notes Backup" && copy /y "%~DPa\names.nsf" "p:\Notes\Backup\%~Na.names.nsf")

![]() |
delete x number of lines ...
|
Batch programming, userna...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |