How to find all jpg's with spaces in the file names
I have a file share where they aren't supposed to put spaces in the file names, because it causes problems in another one of our systems. Is there an easy way to search my file share to find any files with a .jpg extension that have a space in the file name anywhere?I tried doing a search for * *.jpg but that didn't work, it returned everything (i'm guessing because of the space). I can't search through the command prompt either, so it has to be through the search gui.
September 11th, 2009 7:53pm

How can it be that you are only able to search through search gui? With powershell I reckon it would'nt be to hard, but if it has to be through search gui I don't really know. Which OS version?
Free Windows Admin Tool Kit Click here and download it now
September 11th, 2009 9:00pm

It's a long story, but trust me, I can't use the command prompt or powershell. this ones tricky! it's got me stumped and frustrated.
September 11th, 2009 9:14pm

Hello RJO22, Thank you for posting here.Based on the research, we can set the criteria "* *".jpg directly in the Search text box in Search GUI to meet your demand. Besides, you may also try the either the PowerShell or command line to enumerate all the jpg files that have a space in the file name anywhere. Method1. Windows PowershellPS> get-childitem -recurse|where{$_.Name -match "\w*[\s]\w*} | where{$_.extension eq ".jpg"} Please note: \w matches any word character, meaning letters and numbers. \s matches any white space character, such as tabs, spaces, and so forth. \d matches any digit character. The Powershell is built-in on both Windows Server 2008 and Windows Server 2008 R2. If your server is based on Windows Server 2003, you may try to download the Windows PowerShell and install onto it. For more reference: How to Download Windows PowerShell 1.0 http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx Windows PowerShell Tip of the Week http://www.microsoft.com/technet/scriptcenter/resources/pstips/apr08/pstip0418.mspx Windows PowerShell Writing Regular Expressions http://207.46.16.252/en-us/magazine/2007.11.powershell.aspx Method2. Command PromptC:\> dir "* *".jpg /sHope this can be helpful. This posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2009 6:46am

Hi RJO22,I want to see if the information provided was helpful. Please keep us posted on your progress and let us know if you have any additional questions or concerns. We are looking forward to your response. This posting is provided "AS IS" with no warranties, and confers no rights.
September 16th, 2009 5:02am

"* *".jpg does not work when using the Search GUI, it ends up returning all JPGs instead.
Free Windows Admin Tool Kit Click here and download it now
September 16th, 2009 4:14pm

Hi RJO22, Can you please try Windows PowerShell or command prompt to see if it works for on your side? Thank you.This posting is provided "AS IS" with no warranties, and confers no rights.
September 17th, 2009 5:41am

That's part of my problem, mentioned in my original post. I can't use cmd or powershell.
Free Windows Admin Tool Kit Click here and download it now
September 17th, 2009 4:02pm

Hi RJO22, Can you please try using following pattern to search in GUI? There is a blank between *. According to my test, this can fulfill the demand. "* *".jpg I appreciate your time if you can try it again.This posting is provided "AS IS" with no warranties, and confers no rights.
September 21st, 2009 6:27am

When I do this"* *".jpgI still get all pictures, even ones without spaces in the file name. I'm trying it from a server 2003 box.
Free Windows Admin Tool Kit Click here and download it now
September 21st, 2009 4:39pm

When I do this"* *".jpgI still get all pictures, even ones without spaces in the file name. I'm trying it from a server 2003 box. I don't know what you are doing different. It works for me:C:\Users\Public>dir/s/b "* *.jpg"C:\Users\Public\Documents\Stardock\ThemeManager\AMD Game.jpgC:\Users\Public\Documents\Stardock\ThemeManager\Think Green.jpgThat was on Server 2008 R2, but I also tried it on Server 2003 and got similar results.
September 21st, 2009 11:17pm

How did you run a dir command from within the Windows search GUI?That's the caveat for this, has to be done from the Windows search GUI, no powershell or cmd.
Free Windows Admin Tool Kit Click here and download it now
September 22nd, 2009 12:34am

How did you run a dir command from within the Windows search GUI?That's the caveat for this, has to be done from the Windows search GUI, no powershell or cmd. Why? Do you have a bet riding on this or something?
September 22nd, 2009 1:32am

No bet, I need non-admin users who are locked out of powershell and the command prompt via GPO to be able to find files like this.
Free Windows Admin Tool Kit Click here and download it now
September 22nd, 2009 3:57pm

I looked into this some more.If the Indexing service is running, and your users can open the Indexing Service console, they can use the query form there. This GUI isthe MMC console ciadv.msc. In it, you can double click a catalog to expose a link to the query form.The advanced query #FileName "* *.jpg" works.I created a customized console by opening mmc and selecting File\add/remove snap-in. I added the Indexing service snap-in. I drilled down to the query form and select View\customize and unchecked both Console Tree and Action Pane. Then I saved the console with a name of my chosing (.msc). You could create a shortcut to such a file. The users would still have to enter the query.If the Indexing service is enabled, the Windows search GUI, aka Search companion or Search assistant has a link to the the Indexing service GUI. At least it did on my XP Pro x64 machine where the Indexing service is enabled.On my Server 2003 R2 x64 machine, it was harder to get to but I finally did it. I selected "Change preferences", then "Without Indexing service" and then "Change Indexing Service settings (advanced)". Then the Indexing service console opened.
September 23rd, 2009 6:41am

Yeah, looks like that would be the only possible answer. Was hoping it was a ton easier, but I guess this would have to work. thanks.
Free Windows Admin Tool Kit Click here and download it now
September 23rd, 2009 3:44pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics