Create a folder on the file system

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
Redsandro
Posts: 108
Joined: June 25th, 2008, 4:55 pm

Hi,

Can I create a folder on the filesystem? I have a script make some changes to some files, but I'd like it to create a subfolder to store the changed files in.
I can read() and write(), but as far as I've found out, I need a File System Object for writing folders. I didn't test if it works but I don't like it because ActiveX is not available everywhere.
avi + m2t -> Vdub + DGIndex -> AE CS3 -> x264 -> Hell On Earth :mrgreen:
Yenaphe
Posts: 84
Joined: February 3rd, 2009, 6:30 pm
Location: Paris - France
Contact:

Maybe i'm missing something, but AFAIK ActiveX has nothing to do with your script creating folders on your hdd.

In the Javascript Tool Guide CS4 (attached to this post), from page 55 to 60, you have all the informations you need to create, rename, remove,... a folder from within your script.

I don't have time to post an exemple sadly, but i hope this bit of info will still help you

Seb
Attachments
javascript_tools_guide_cs4.zip
(2.48 MiB) Downloaded 665 times
Redsandro
Posts: 108
Joined: June 25th, 2008, 4:55 pm

Thanks! Yes it helps me. I actually had that guide (CS3 version) but I forgot about it; I read through the CS3 Scripting Guide instead and couldn't find the info.

I wonder if that's javascript native because the method I knew (ActiveX I was talking about) goes something like this:

Code: Select all

myFSO = new ActiveXObject("Scripting.FileSystemObject");
myFolder = myFSO.CreateFolder ("d:\\cool");
avi + m2t -> Vdub + DGIndex -> AE CS3 -> x264 -> Hell On Earth :mrgreen:
Post Reply