Skip to Content
It is currently October 15th, 2019, 8:36 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Read files from dir
PostPosted: August 14th, 2018, 1:27 am 
Offline
New User
New User

Joined: September 3rd, 2008, 7:43 am
Posts: 19
Hi There,

I would like to move/rename some audiofiles from 1 directory to another.

Is it somehow possible in PAL to read/list the files from a directory and then rename them ?

I have been going through SAM's functions, perhaps I've missed it.

Kind regards


Top
 Profile  
Reply with quote  
 Post subject: Re: Read files from dir
PostPosted: August 14th, 2018, 3:47 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 7878
Location: Aachen (Germany)
Try the ExecuteCmd procedure in SAM and then use windows / CMD logic.
Or use AutoShell (a third party tool to do just the same thing in older SAM).
If you just want to Rename files but not move them, use the RemameFile PAL command.

There's also another option to use the database to perform your rename / move needs, but that should only be considered if you're already familiar with your database system and it's stored procedures programming language (that option is only available for MySQL/MariaDB, Postgres and MS SQL as a database system, but not for Firebird embedded). That's more of an option if you're a DB Engineer by trade and only do SAM as a hobby, though. Not exactly the stuff mere mortals would do or want to learn. (Can't really help with that option myself from the top of my head and am currently not willing to go diving into the documentation of the database for that unless someone was paying very good money, so consider that just for the sake of completeness :D)

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

We're offering custom PAL / PHP code and general SAM assistance at palscripts.com

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
 Post subject: Re: Read files from dir
PostPosted: August 21st, 2018, 3:04 pm 
Offline
New User
New User

Joined: September 3rd, 2008, 7:43 am
Posts: 19
Thanks !

I've used the Database option. Import the directories into a category and perform the actions via sql statement .. works great !


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group