Announcement

#1 2012-07-09 23:08:51

isaac
Guest

Filename and directories with spaces in them.

I have over 2GB of images on my server that are organized by albums via directories.  Many of the name have spaces in them. 

Is there a way to get the FTP sync to work with these names?  I am simply not willing to rename all the files / folders -- its too much work.

I am using  2.4.1.

Thanks in advance,
Isaac

 

#2 2012-07-09 23:16:50

mendip_discovery
Member
Mendip Hills, Somerset, UK
2012-05-19
90

Re: Filename and directories with spaces in them.

TBH I think that if you take the internet seriously then you would rename the files. Use a batch filename program to correct the file names.

If you use replace " "(a space) with an "_" it still keeps things all nice an tidy.

I have more than 2GB uploaded so I know its a task and a half.


Jack

Offline

 

#3 2012-07-09 23:18:42

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Filename and directories with spaces in them.

if the only problem is renaming you can use a tool like AntRenamer, very powerfull

Offline

 

#4 2012-07-09 23:49:14

flop25
Piwigo Team
2006-07-06
7037

Re: Filename and directories with spaces in them.

you could try to use the $conf['sync_chars_regex'] also but a Batch renammer is easy and assure you there will be no conflicts


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2012-07-10 01:27:10

pewe
Member
2012-03-16
439

Re: Filename and directories with spaces in them.

but a Batch renammer is easy

Is there such a thing as a batch renaming script for files and folders for online use (php).

Offline

 

#6 2012-07-10 02:34:32

Isaac
Guest

Re: Filename and directories with spaces in them.

flop25 wrote:

you could try to use the $conf['sync_chars_regex'] also but a Batch renammer is easy and assure you there will be no conflicts

Where do I put this and what does it do?

I dont understand how we put men on the moon over 30 years ago but I can't have spaces in my file path -- this makes no sense.  That's what "\" is for.

 

#7 2012-07-10 11:44:32

flop25
Piwigo Team
2006-07-06
7037

Re: Filename and directories with spaces in them.

Isaac wrote:

flop25 wrote:

you could try to use the $conf['sync_chars_regex'] also but a Batch renammer is easy and assure you there will be no conflicts

Where do I put this and what does it do?

Localfiles editor, config.
There is a Search feature on that forum

Isaac wrote:

I dont understand how we put men on the moon over 30 years ago but I can't have spaces in my file path -- this makes no sense.  That's what "\" is for.

well you don't understand how the web works too : special characters in url requires to be utf8 from server to the browser, and spaces gives a %20
currently you can read [Forum, post 132172 by RMM in topic 19845] 2.4.1 Thumnails don't get created for filenames with spaces and umlaut : add % too in the conf variable


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#8 2012-07-10 12:01:36

pewe
Member
2012-03-16
439

Re: Filename and directories with spaces in them.

Isaac,

I have found a small php script that renames every file in a given directory on a server (rather than locally) allowing different parameters to be used. This saves downloading and uploading them all again when changes are needed.

I just tested it changing spaces in all files to an underscore and it worked.

If this would help, just let me know.

It's not a sophisticated script, (and doesn't work on directories) but it works well enough for situations where there is a need such as yours.
If you can code PHP, you my be able to improve the script so the options could be set in a web page rather than hardcoding in the script.

Last edited by pewe (2012-07-10 12:24:08)

Offline

 

#9 2012-07-10 17:56:06

isaac
Guest

Re: Filename and directories with spaces in them.

I've decided to go with zenphoto.  It works fine with spaces in the name. 

I understand what utf8 is and don't understand why it can't be dealt with in code to allow for spaces.

 

#10 2012-07-10 18:03:37

flop25
Piwigo Team
2006-07-06
7037

Re: Filename and directories with spaces in them.

as you wish


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#11 2012-08-20 21:27:17

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

With the introduction of 2.4 is it now possible to use spaces & special characters in file names & directory names. If you modify the source code using: $conf['sync_chars_regex'] ??

And you can still get sync to work also?

I am very interested in switching to Piwigo from an html based gallery. I do have php and sql experience, but I currently have about 15,000 images in a good tree folder structure, but have spaces in the folder names & the file names.

Offline

 

#12 2012-08-20 21:49:58

flop25
Piwigo Team
2006-07-06
7037

Re: Filename and directories with spaces in them.

There are batch renamers which can renames thousands of files and folders in a few seconds
But you can use this new conf parameter to allow spaces or more


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#13 2012-08-20 22:02:44

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

I would gladly use a file renamer, but the photo name, is the file name. Can i then code piwigo to strip the underscores when it displays the photo name on thumbnails and images?

Offline

 

#14 2012-08-20 22:12:34

flop25
Piwigo Team
2006-07-06
7037

Re: Filename and directories with spaces in them.

tplowe56 wrote:

I would gladly use a file renamer, but the photo name, is the file name. Can i then code piwigo to strip the underscores when it displays the photo name on thumbnails and images?

If I don't mistaken Piwigo already convert underscores to spaces


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#15 2012-08-20 23:17:59

tplowe56
Member
2012-08-20
15

Re: Filename and directories with spaces in them.

OK...so i can go either route, but renaming is considered less problematic.

But if I chose not to rename,  I can modify the config file to handle space in both files & folders. And I will also, still be able to batch sync the entire gallery to the database?

Sorry to beat this thread to death but if I switch to Piwigo I will need to ask these questions anyway.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact