I am a Dudette ;}

What I am trying to do is create a script that copies the file names.nsf into a folder that is created using the *.id file. This file is going to be diffrent for each user, the only similarity is the .id extension. Once I capture this file using

code:
$id = dir("c:\lotus\notes\data\*.id")
if
@error = 0
? "no error"
else
@error = 1
? "there is an error"+ @serror+"You should notify the Administrator"
endif

What I want to do then is to create a folder on the network and name it using the .id file for identification of the user. That is why i needed to create the value of $id variable.
After the folder is created I need to then copy the name.nsf for a particular user and copy it to the folder that was created with .id file. It doesn't really matter that the folder is named the same( just identification purposes) as the file I located since the file I want to copy
is a diffrent file altogether.
So what I need to do is pull the names.nsf file from the local user and copy it into the folder I created on the netork.

If I use the the code you last sent it copies the .id file not the names.nsf which is the source file($sourcefile)
I can accomplish this if I hard code the $targetdir as such.

Code:
$targetdir="\\orrm\domino\local_notes\atiisler.id"

Everything works fine then. The atiisler.id folder is created and the names.nsf file is copied into it. The problem is that every user has a diffrent .id file and I would have to hardcode it for over 100 users. So I want to set it up based on the .id file that is found. And if that user doesn't have a folder to create it. Does this help? What I am trying to do is to create a backup of a file for Lotus notes. The .nsf is = .pst, but notes does load to server only on local station which is not backed up daily the server is. We need to do this for purposes of restoration.
Sorry so lenghy guys.......Thanks AGAIN