-
Move Files to SubFolders
I've exhausted my efforts to solve this on my own. I'm fairly new to scripting and I'm hoping someone with more experience can point me in the right direction.
I have a script that creates thousands of images in one folder. At the end of the script I'd like to sort the images into subfolders. The script successfully creates the subfolder and I can move the file if i use the exact path. But I need something that will work on variable filenames.
When i save the file i use this script with success...
"-SaveRenderWindowAs ""C:\Rendermation\renders\" & folderIdx.name & "_AccentGem" & ".png" & """"
The folderIdx.name successfully uses a name that changes per file.
When I move the file into its subfolder...
This script works fine (defining the exact path)
Set fs = CreateObject("Scripting.FileSystemObject")
fs.MoveFile "C:\Rendermation\Renders\perspective_Ring_Solitaire_Marquise_6X3mm.3dm.png" , "C:\Rendermation\Renders\Ring_Solitaire_Marquise_6X3mm.3dm\"
However, if i replace this line, it fails...
fs.MoveFile "C:\Rendermation\Renders\perspective_" & folderIdx.name, "C:\Rendermation\Renders\" & folderIdx.name & "\"
This is the error.
"Microsoft VBScript runtime error"
"Object required:'folderIdx'"
Any ideas?
Jill
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules