# Adding files and folder from anywhere (not just the custom folder) #231

Open
opened this Issue Feb 16, 2018 · 42 comments

Projects
7 participants
Member

### Llewellynvdm commented Feb 16, 2018

 I have had the need to often grab files from other places then just the custom folder in JCB, so I would like to add the feature to add any path to a file or folder and be able to include it in any component upon the compilation.

Member Author

### Llewellynvdm commented Feb 16, 2018

 Basically by just extending the Component Files & Folders concept, to have a basic (the old way) and advanced (the new way) tab with the related features to include files and folders.

### fred-the-coder commented Nov 19, 2018

 I am afraid this feature is not working in Windows environment. Indeed when using an absolute path as "F:\www\joom3..." as custom files or folders, I have an error at compilation time like "'The folder path: /F:\www\joom3... does not exist, and was not added!" Maybe I have to use a different path syntax? Thank you

### pdward commented Jan 23, 2019

 Unfortunately this issue is still ongoing in a Windows environment. Currently still testing solutions - apart from changing to linux ;)
Member Author

### Llewellynvdm commented Jan 23, 2019

 Okay I will open this up again ,and lets see how we can resolve this...

Member Author

### pdward commented Jan 24, 2019 • edited

 Note this is without the fixes proposed by myself or @Llewellynvdm earlier
Member Author

### Llewellynvdm commented Jan 24, 2019

 I must say I am sorry I did not realize sooner that the Windows guys are not able to see JCB in action... but I am sure we can improve this dramatically, it is not that major really. Please keep sending more ideas and feedback on this topic.

### peterpetrov commented Jan 24, 2019

 I have to apologize I was unable to do any tests for the last day. I am about to use another machine which runs on Windows. My virtual options are not great at the moment as my hosting provider couldn’t run properly windows server. I will get back to you later tomorrow I hope. Peter From: "((ewe))yn" Reply-To: vdm-io/Joomla-Component-Builder Date: 24, January,Thursday -2019, 22:07 To: vdm-io/Joomla-Component-Builder Cc: Peter Petrov , Mention Subject: Re: [vdm-io/Joomla-Component-Builder] Adding files and folder from anywhere (not just the custom folder) (#231) I must say I am sorry I did not realize sooner that the Windows guys are not able to see JCB in action... but I am sure we can improve this dramatically, it is not that major really. Please keep sending more ideas and feedback on this topic. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#231 (comment)>, or mute the thread.
Member Author

### Llewellynvdm commented Jan 24, 2019 • edited

 I understand completely, thanks!
Collaborator

### ro-ot commented Jan 27, 2019

 I agree with @mwweb stop trying to fix things that are not broken. Instead use the tools that fixes Windows! they are what is broken.
Member Author

### Llewellynvdm commented Jan 27, 2019 • edited

 I can only smile at that... but I would like to still improve JCB to work on both. I know this will add extra load, but trust it will not be to much. We can try and move it all into one function. I will try to be as discreet as I can to avoid messing with the core flow. This cleanup will just do us all good in the long run, since little refactoring never hurt anyone.

Closed

### pdward commented Mar 13, 2019

 I think the problem is because I'm using JPATH_ROOT instead of C: Hence the regex ('/^[a-z]:/i') on line 1304 isn't applicable

### pdward commented Mar 13, 2019

 Updating the dynamic path before checking for a drive/windows full path works
Member Author

### Llewellynvdm commented Mar 13, 2019

 Okay let me also change that, should not be a big deal.

### Llewellynvdm added a commit that referenced this issue Mar 13, 2019

 Moved the update of dynamic paths before preg_match to better mannage… 
… the forward slash placement. gh-231
 8bf7224 
Member Author

### Llewellynvdm commented Mar 14, 2019

 @pdward please confirm that this issue is resolved for you?

### pdward commented Mar 14, 2019

 Yes - the latest staging version works for me for advanced files / folders on windows