FMaker - a folder maker stack

Want to talk about something that isn't covered by another category?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 285
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

FMaker - a folder maker stack

Post by jameshale » Wed Sep 27, 2017 7:44 am

Just uploaded to "sample stacks" (button on toolbar in IDE or <http://livecodeshare.runrev.com>

FMaker is a utility stack to make folders/directories.

It will take a list of files from a directory (or a text file) and create folders with the same names as are in the list.

Once loaded:
• the list can be edited within the stack,
• the list entries can have text removed or replaced
* GREP can be used
• if the list comes from a directory listing the files can be moved into the
newly created folders.
• it uses a couple of SVG widgets so hopefully you will see them.

I actually use it as a standalone on my Mac.

Origin.
I handle quite a few media files which, after processing, need to be placed in a folder having the same (or similar) name.
Given I do this a lot this was definately a task that could be automated in some way.

Enjoy!
Last edited by jameshale on Thu Dec 14, 2017 7:51 am, edited 1 time in total.

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 285
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: FMaker - a folder maker stack

Post by jameshale » Thu Dec 14, 2017 7:51 am

Updated FMaker to use "revCopyFile" rather than <URL "binfile..."> when moving files to newly created folder. This means the files do not need to be read into memory to be moved. This speeds up the process considerably, especially if you are moving large files, or the files reside on a network drive.

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 285
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: FMaker - a folder maker stack

Post by jameshale » Sun Mar 25, 2018 6:38 am

Updated FMaker again:
Decided to use the mv shell command to move the files into folders.
The revCopyFile command was fine for small files but larger ones tended to take a while to copy.
mv seems to take the same time regardless of file size, even over network drives.

So the shell command being used is:
mv -f 'filepath' 'directorypath'
where both the "file" and "directory" paths are enclosed in single quotes, and any internal quotes are escaped and single quoted.

Post Reply

Return to “Off-Topic”