Copy/Paste .nomedia file into multiple backdrop folders

Hello,
I bought Infuse Pro years ago. I use the .nomedia file in my backdrop folder, so that infuse doesn’t show them in the interface after scanning. How can i copy/paste the .nomedia file into the backdrop folders of around 2000 movies using a .bat file or any other option. I am totally new to scripting, so please help me in layman’s terms. Thank you

Do you have video files in these backdrop folders?

If it’s just images Infuse shouldn’t be showing content from these folders in the library.

They may be visible if browsing directly via folders though.

Hello,

There are video files in the backdrop folders. These are movie themes provided by Emby. The .nomedia file prevents infuse pro from indexing these movie theme mp4 in the UI. So i want to copy and paste it to all backdrop folders. That way i have the best of both worlds. Emby for the great interface on especially nvidia shield and playing 1080p movies. Infuse Pro for the best quality of hdr/dolby vision movie playback on the apple tv 4K.

Greetings

Bart Peters

Ok, in that case you could look at using the touch command as this can be used to create empty files.

I already have the .nomedia file. My problem is how to copy and paste this file to thousands of backdrop folders spread out through my movie collection (a large quantity of movies have a backdrop folder with a mp4 movie theme in it)

Easiest way is to probably write a bash script to find the backdrop folders and then copy the file or use touch to create a new empty file.

I think if you are looking for help writing a script you would need to provide some information such as:

  • system on which you are able to run the script; Window, Linus, MacOS or directly on a NAS.
  • Is the name of the backdrop folder always the same name?

Additional information is likely to be needed, but those would be starter questions that are needed to even get started.

I have a windows 11 latest version laptop. The backdrop folder is named the same everywhere. The .nomedia file is located in my download folder. The movie folders (with 1 backdrop folder each) are located on 2 qnap nas devices.

I already have the .nomedia file. My problem is how to copy and paste this file to thousands of backdrop folders spread out through my movie collection (a large quantity of movies have a backdrop folder with a mp4 movie theme in it)

Here is a powershell command that will list the directories that need updating.
It assume your backdrop folder is called “Backdrop” and you films are in the directory X:\ (amend as appropriate)

Get-ChildItem -Recurse -Directory -Filter "Backdrop" X:\ | % { echo "$_\.nomedia" } 

I have deliberately made it just echo the name rather that do anything more powerful (scripts can be dangerous if they go wrong).

But the echo command in the braces could be changed to actually do the copy.

Thank you remotevisitor for this powershell command. I made a test folder V:\Test In that folder i have the moviefolders named a up to i. The name of the Backdrop folder is backdrops. backdrops without .nomedia file are in moviefolders a,b,c, backdrop folder with .nomedia file are in moviefolders d,e,f, moviefolders without backdrops folder are g,h,i. The location of my .nomedia file is C:\Users\bartp\Downloads.nomedia Could you addapt the powershell command with these parameters? I’m new to the use of powershell commands so please excuse my laymans terminology. Greetings Bart

Bart,

Here is my attempt to make a command suitable for you.

Get-ChildItem -Recurse -Directory -Filter "backdrops" -Name "V:\Test\g" | % { copy "C:\Users\bartp\Downloads\.nomedia"  "V:\Test\g\$_\.nomedia" }

I have assumed you missed a backslash in your posting when you specified C:\Users\bartp\Downloads.nomedia as youe .nomedia file (if not remove the backshash I added.

The command I have created will recurse down the “C:\Test\g” directory looking for any directory called backdrops and copies the .nomedia file into it.

If the changed the “V:\Test\g” directory to “C:\Test” it will do that for all you test directories d, e, f, g, h, i. This should probably be safe as overwriting existing .nomedia files with a new one should not be an issue. Notive that the “V:\Test\g” occurs twice in the command

You could initially exeriment using just the 1st half of the command line to list the backdrop folders:

Get-ChildItem -Recurse -Directory -Filter "backdrops" -Name "V:\Test\g" 

Then when you are happy it is finding the OK run the full command line.

Thank you so much remotevisitor. This powershell command works perfectly. It saves me several hours of work. Great work, thanks again