[Logo] Jaikoz and SongKong Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
rename using underscores  XML
Forum Index -> SongKong Questions
Author Message
dbadia



Joined: 06/06/2013 22:14:05
Messages: 4
Offline

When renaming files, is there a way to replace all spaces with underscores?

Thanks
Dave
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 7485
Offline

Yes, using Javascripts replace function.

i.e to change all spaces in the title field to underscores you could use


title.replace(' ','_',"g")

The g mean globally replace rather than just replace the first occurrence of space.

thanks Paul (Administrator)
dbadia



Joined: 06/06/2013 22:14:05
Messages: 4
Offline

Ah, javascript. Very nice, allows for lots of customization. Thanks for the tip.
 
Forum Index -> SongKong Questions
Go to:   
Powered by JForum 2.1.6 © JForum Team