Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt JS copy to network location

Tags:

copy

gruntjs

I want to use grunt-contrib-copy (or any other grunt copying plugin) to copy files to network location.

Trying below:

    copy: {
        test: {
            files: [
                { src: ['Scripts/*'], dest: ['\\\\location\\site\\Scripts\'] }
            ]
        }
    }

but getting:

Warning: Unable to write "\\location\site\Scripts\" file (Err or code: undefined). Use --force to continue.

Is it possible / How to copy to network location?

like image 312
Sergej Popov Avatar asked May 14 '13 10:05

Sergej Popov


1 Answers

Yes, it's quite simple to do, just define your path with forward slashes:

copy: {
     test: {
         files: [
             { src: ['Scripts/*'], dest: ['//location/site/Scripts/'] }
         ]
     }
}

This will work on windows as-well, grunt will take care of that. Try it out.

like image 72
Allan Kimmer Jensen Avatar answered Sep 28 '22 15:09

Allan Kimmer Jensen