Skip to content

Support Windows file names #5

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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