Filtering files when creating a project from existing local sources?

Hi,

I just got started with phpstorm and I would like to create a project from an existing oscommerce online shop.
My source directories are very messy with lots of .txt files and many temporary or old php files. I would like to
keep this mess out of my project.

Can I filter which files to incorporate into the project?
I would only like to import .php, .htm and .js files and only if the file names
do not comprise "old" or "tmp".

Is there any way to do this? Or can I tell phpstorm to ignore these files?

Thanks,

frimipiso

1 comment
Comment actions Permalink

Hi there,

No really. Whole folder will be included.

You can then:

  • Exclude individual sub-folders manually (per project setting): via right click on such folder in Project View panel and choosing "Mark Directory As | Excluded" .. or via "Settings/Preferences | Project | Directories". Such folders can still be shown in Project View (depends on that panel setting) and by default will participate in deployment/VCS operations -- they only excluded from indexing/searching.
  • Exclude by folder/file name pattern. It's an IDE-wide setting (affects all projects) and such files/folders will be completely filtered out from the project. Such setting is located at "Settings/Preferences | Editor | File Types | Ignore files and folders"
  • If you need to deploy files to another folder/server -- deployment settings have similar settings (configured separately)


In Project View you can also just hide such unwanted files/folders:

  • Create custom scope at "Settings/Preferences | Appearance & Behaviour | Scopes" and include only desired files (while excluding all unwanted)
  • Use that scope in Project View panel instead of default "Project" scope
0

Please sign in to leave a comment.