Skip to content

Support Windows file names #5

@TravelingTechGuy

Description

@TravelingTechGuy

Trying to use in Windows (after successfully using on a Mac). Apparently the wrong file name is sent to ExifTool, probably due to spaces in the file name. I wrote a short test code:

var exif = require('exif2'),
    //file = 'c:/Users/Guy/Pictures/CES 2014/2014-01-07 CES Day 1/Samsung monitor 1.jpg';
    file = 'c:\\Users\\Guy\\Pictures\\CES 2014\\2014-01-07 CES Day 1\\Samsung monitor 1.jpg';

exif(file, function(err, obj){
  console.log(err || obj);
});

I received the following error:

{ [Error: Command failed: File not found: c://Users//Guy//Pictures//CES/  
File not found: 2014//2014-01-07/                                         
File not found: CES/                                                      
File not found: Day/                                                      
File not found: 1//Samsung/                                               
File not found: monitor/                                                  
File not found: 1.jpg                                                     
] killed: false, code: 1, signal: null }

I tried other variations, but I guess the space is just not escaped. Would be glad to have support for it, or even add it myself via a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions