node js find directory change directory

Solutions on MaxInterview for node js find directory change directory by the best coders in the world

showing results for - "node js find directory change directory"
Idriss
22 Jan 2016
1// get current directory 
2var cur_dir = process.cwd();
3console.log(cur_dir);
4// change current directory
5
6process.chdir('C:\\Projects\\experiments');
7console.log(process.cwd()); 
8
9// path.join for cross-platform paths:
10const path = require('path');
11process.chdir(path.join('C:', 'Projects', 'experiments'));
12console.log(process.cwd()); 
13process.exit();
similar questions
queries leading to this page
node js find directory change directory