Help: Create a set of subfolders with parent's folder name

Discuss and share scripts and script files...
Post Reply
Threshold
Posts: 19
Joined: 08 Sep 2008 13:39

Help: Create a set of subfolders with parent's folder name

Post by Threshold »

Hello,

I have gone through help files and beginners' help but even that is evidently too much for me so if anyone has time to spare and want to help me out I'd appreciate that.

Basically I just want to create a set of subfolders named:

-Parent folder's name "+" Main Series
-Parent folder's name "+" Miniseries
-Parent folder's name "+" One-Shots

So if the parent folder is Alpha:

-Alpha Main Series
-Alpha Miniseries
-Alpha One-Shots


I tried copying bits and pieces from other scripts but nothing come out really.

Many thanks

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Help: Create a set of subfolders with parent's folder na

Post by TheQwerty »

You're after the New command and the <curfolder> variable.

Give this a try:

Code: Select all

"Create Folders"
    New("<curfolder> Main Series", 'dir');
    New("<curfolder> Miniseries", 'dir');
    New("<curfolder> One-Shots", 'dir');

Threshold
Posts: 19
Joined: 08 Sep 2008 13:39

Re: Help: Create a set of subfolders with parent's folder na

Post by Threshold »

TheQwerty wrote:You're after the New command and the <curfolder> variable.

Give this a try:

Code: Select all

"Create Folders"
    New("<curfolder> Main Series", 'dir');
    New("<curfolder> Miniseries", 'dir');
    New("<curfolder> One-Shots", 'dir');
Wow thank you it works perfectly!

I copied the "Create Folders" from another script and yet it told me it wasn't a valid command; never mind.

Is there anything where I can learn how to do simple scripts?
Something easier than the beginners' scripting or the help included in xy?

Many thanks

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Help: Create a set of subfolders with parent's folder na

Post by TheQwerty »

Threshold wrote:Is there anything where I can learn how to do simple scripts?
Something easier than the beginners' scripting or the help included in xy?
Unfortunately not. The easiest thing to do is to post questions and well defined requests here in the forums.

There's generally a few people more than willing to write or explain a script.

Beyond that enabling Scripting > Step Mode and walking through some scripts on your own is a pretty good way to get a grasp on how XY processes scripts and see the results of individual commands.

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: Help: Create a set of subfolders with parent's folder na

Post by j_c_hallgren »

Threshold wrote:Is there anything where I can learn how to do simple scripts?
Something easier than the beginners' scripting or the help included in xy?
If you've not seen it already, I'd suggest looking at this thread that Stephan (one of our scripting experts!) points to in his signature ("Scripting for beginners"):
http://www.xyplorer.com/xyfc/viewtopic. ... 436#p60436
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

Threshold
Posts: 19
Joined: 08 Sep 2008 13:39

Re: Help: Create a set of subfolders with parent's folder na

Post by Threshold »

All righty thanks to you both.

I guess I'll keep using other people's scripts or bug you again for stuff I can't find. :D

j_c_hallgren yes I did look at "Scripting for beginners" as mentioned previously but it didn't help me in creating my script; I would need something easier still. :)

Thanks

Post Reply