powered by Jive Software

Redirected My Documents and File Transfer Download Directory

Has anyone has success moving the File Transfer Download Directory to redirected My Documents?

We use redirected My Documents, but not roaming profiles.

I have created a logon scripts that create a download folder in the users redirected my documents and another that creates the C:\Documents and Settings%username%\Spark directory and copies the spark.properties file to this directory.

My problem is that I am unable to successfully use the %username% in the downloadDirectory path in the spark.properties file. Example: If I specify the path

My Documents
Spark Downloads, the folder is actually created in the my documents redirect share and the actual windows users folder is not used. Explorer knows how to use the username enviroment variable, but JAVA takes it litterlaly.

I have though about a user logon script that could replace the %username% in the spark.properties file with the actual path, but that is beyond my scripting capabilities and I don’t even know if that is possible.

I don’t want user filling up their user profile with downloaded files, that is why we are using redirected my documents.

This is the only issues standing in the way of deployment.

Any help or insight is appreciated.


I haven’t worked on this for several months, but decided to tackle it again yesterday and I actually came up with something.

Here is a copy of the vb user logon script that changes the spark.properties download location.

First it identifies the account username. It then locates the user profile and then the spark.properties file and then reads its contests into a string. The string is searched for <&&UserName&&> which is then replaced with the current account username…redirected my documents create the user folder on the server based on the account name and not the local profile.

The park.properties file has this entry


My Documents
Spark Downloads

I wanted to do this to discourage users from saving to the local machines and to make it easier for them to save to my documents.

Const ForReading = 1

Const ForWriting = 2

Const USER_PROFILE = &H28&

Dim objNetwork

Set objNetwork = CreateObject(“WScript.Network”)

strUserName = objNetwork.UserName

Set objFSO = CreateObject(“Scripting.FileSystemObject”)

Set objShell = CreateObject(“Shell.Application”)

Set objFolder = objShell.Namespace(USER_PROFILE)

Set objFolderItem = objFolder.Self

strPath = objFolderItem.Path

strPath = strPath & “\Spark\spark.properties”

Set objFile = objFSO.OpenTextFile(strPath, ForReading)

strText = objFile.ReadAll


strNewText = Replace(strText, “<&&UserName&&>”, strUserName)

Set objFile = objFSO.OpenTextFile(strPath, ForWriting)

objFile.WriteLine strNewText