copyFile not writing new files in Windows 7

I have a file exporter that bundles all textures used by model and creates copies of those files in the exported folder.

Recently I upgrades to Windows 7, and now this script isn't functioning. I am running 3ds Max 2010 in Admin mode.

Here is the snippet of the code.. if that helps.
--------------

------------------------------
-- Copy images --
------------------------------

if ok==true then
(
for usedMaterial in sceneMaterials do
(
if isProperty usedMaterial "diffusemap" then
(
if usedMaterial.diffusemap!=undefined then
(
filename = usedMaterial.diffusemap.fileName
newfilename = vrmlDir+"\\"+(filenameFromPath filename)
copyFile filename newfilename
)
)
if isProperty usedMaterial "materialList" then
(
for j in 1 to usedMaterial.materialList.count do
(
if isProperty usedMaterial.materialList[j] "diffusemap" then
if usedMaterial.materialList[j].diffusemap!=undefined then
(
filename = usedMaterial.materialList[j].diffusemap.fileName
newfilename = vrmlDir+"\\"+(filenameFromPath filename)
copyFile filename newfilename
)
)
)
)

--------------

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fajar's picture

admin problem maybe ? try

admin problem maybe ? try login as admin.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.