VBScript filesys.CopyFile to a folder that is partly random
Can anyone help me with cracking this nut?
I have a folder in %localappdata% that is partly random that I need to
move a file into.
%localappdata%\acroprint\TQP4_{random string of letters}\4.1.15.25435\
dim filesys, oShell
Set oShell = CreateObject("WScript.Shell")
strHomeFolder = oShell.ExpandEnvironmentStrings("%LOCALAPPDATA%")
set filesys=CreateObject("Scripting.FileSystemObject")
If filesys.FileExists("\\tstcfile\public\tqp41_15\user.config") Then
filesys.CopyFile "\\tstcfile\public\tqp41_15\user.config",
strHomeFolder & "\Acroprint\TQP4_{random string of
letters}\4.1.15.25435\", true
End If
So far, this is the closest I can get the script to work. My issue is with
the random string of numbers and letters that is unique on each desktop. I
know I cant use an * in the destination. Does anyone know a workaround?
Thanks Chris
No comments:
Post a Comment