// db.layers.find({path:/e:\\upload/})
// .projection({})
// .sort({_id:-1})
// .limit(100)
/*db.layers.update({path:/e:\\upload/}, {"$set": { "path": }})*/
/*db.layers.find({path:/E:\\upload/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("E:\\upload\\","/data/thrc_zhf/release/156tuisong/upload/upload/").replace(/\\/g,"/");
print(newPath);
db.layers.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.layers.find({path:/thrc_/})*/
/*db.layers.find({path:/e:\\data/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("e:\\data\\","/data/thrc_zhf/release/156tuisong/data/data/").replace(/\\/g,"/");
print(newPath);
db.layers.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.folders.find({path:/E:\\upload/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("E:\\upload\\","/data/thrc_zhf/release/156tuisong/upload/upload/").replace(/\\/g,"/");
print(newPath);
db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.folders.find({path:/e:\\data/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace("e:\\data\\","/data/thrc_zhf/release/156tuisong/data/data/").replace(/\\/g,"/");
print(newPath);
db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/* db.folders.find({path:/thrc_zhf/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace(/\\/g,"/");
print(newPath);
//db.folders.update({_id:row._id},{"$set": { "path": newPath}});
})*/
/*db.layers.find({path:/thrc_zhf/}).forEach(function(row){
//print(row._id + row.path);
let newPath = row.path.replace(/\\/g,"/");
print(newPath);
db.layers.update({_id:row._id},{"$set": { "path": newPath}});
})*/
原文:https://www.cnblogs.com/dog2016/p/11389060.html