Workaround for $isdir, /mkdir one word - 07/08/14 01:23 PM
Hey, I'm trying to create a script that moves my files from a dir to a subdir.
Basically, I have new files in H:\Anime popping up each day, and I want this script to automatically move them to H:\Anime\Filename, or create a dir if one doesn't exist.
However. When I tried doing this, I noticed that trying to create a dir called "Test 2" or trying to read if $isdir it would never use anything more than the first word.
Help would be appreciated!
Including script and reference picture with echo.
As you can see, it created the Tokyo folder when a Tokyo Ghoul folder was already created, and same with the other file. Moving them does not work either, it will not use 2 word filenames either.
Basically, I have new files in H:\Anime popping up each day, and I want this script to automatically move them to H:\Anime\Filename, or create a dir if one doesn't exist.
However. When I tried doing this, I noticed that trying to create a dir called "Test 2" or trying to read if $isdir it would never use anything more than the first word.
Help would be appreciated!
Including script and reference picture with echo.
Code:
alias FolderSort { var %main H:\Anime var %files $findfile(%main,*.mkv,0,0) while %files { var %file $findfile(%main,*.mkv,%files) var %regex /(\[HorribleSubs\] .+ -)/iS if ($regex(%file,%regex)) var %file $remove($regml(1),-,[HorribleSubs]) echo -ag %file if (!$isdir(%main $+ \ $+ %file)) { echo 3 -ag I had to create a folder for %file in %main $+ . mkdir %main $+ \ $+ %file } dec %files } }
Originally Posted By: Echo
Tokyo Ghoul
I had to create a folder for Tokyo Ghoul in H:\Anime.
Love Stage!!
I had to create a folder for Love Stage!! in H:\Anime.
I had to create a folder for Tokyo Ghoul in H:\Anime.
Love Stage!!
I had to create a folder for Love Stage!! in H:\Anime.
As you can see, it created the Tokyo folder when a Tokyo Ghoul folder was already created, and same with the other file. Moving them does not work either, it will not use 2 word filenames either.