Forum moved here!

Home / Space in File Names / Paths

it-de

Hi,

i am using the latest x64 Version of Sumatra PDF (3.1.2.0) on a Windows 7 Professional x64. I am having problems opening files that contain space in their filenames or filepaths. Sumatra seems to use space as a separator for opening multiple files.
Is there any possibility to fix this?

kjk

Sumatra can open files with spaces.

How are you opening the files: from command line, by drag&drop, via File/Open, via Open With etc.?

I’m guessing from command line and you’re not properly quoting the name (i.e. "name with spaces.pdf", not just name with spaces.pdf)

it-de

Im trying to open it via right click on the file and then open with -> Sumatra PDF

kjk

Does File/Open from Sumatra or drag & drop on Sumatra window work?

If yes, then the problem is with whatever program launches Sumatra.

If not, what is the exact error message?

it-de

Drag & Drop is blocked.
I reinstalled Sumatra (deleted installation folder after deinstallation) and now it seems to work. I don’t know why. is there a configuration to disable such things?

GitHubRulesOK

Sounds like it was down to user rights, since it is now working, I would not disturb it however Win 10 has a habit of trying to reset PDF association back to Edge whenever it thinks it needs to My Bad as pointed out by @SumatraPeter

The best way to reduce issues for Drag and Drop is to go to sumatrapdf.exe
right click and send to desktop as shortcut on the desktop (NOT tile or taskbar)
then from the desktop shortcut ensure the right-click properties “target” has standard double quote marks and add as shown "%1" separated by one space.

"C:\progr….atrapdf.exe" "%1"

Now you can test drag and drop on that shortcut
If necessary change its compatibility to “run as administrator”. That setting is annoying as always asking for confirmation, so best if you are a standard user to install without needing elevation at run time. one reason I generally use a portable copy for ease of use.
IF ok then make a second copy of short-cut this time without “%1” for simple start-up or pin that second shortcut to taskbar or pin to start

kjk

The only reason I know of for drag & drop not working is if Sumatra is running in elevated mode (as administrator) and you’re trying to drag & drop from regular, non-elevated app.

This is blocked for all apps due to security.

SumatraPeter

Thankfully that’s not a factor in this case as the OP is using Win7 Pro x64.

In any case whatever the problem was, be it with the shell open command for PDFs in the registry or the app being launched in elevated mode, a reinstallation seems to have fixed it.