有人能告诉我我做的语法错误吗?
robocopy "$env:UserProfile\desktop\" "$Destination\desktop" *.* /copy:DAT /log:"C:\Logs"
robocopy "$env:UserProfile\pictures" "$Destination\pictures" *.* /copy:DAT /log+:"C:\Logs"
robocopy "$env:UserProfile\documents\" "$Destination\documents" *.* /copy:DAT /log+:"C:\Logs"
答案 0 :(得分:1)
正如alroc所提到的,看起来function getSinglePart(partPath){
return new Promise((resolve, reject) => {
console.log('log 1');
let tempDirectionsService = new google.maps.DirectionsService;
let tempElevationService = new google.maps.ElevationService;
let tempDirectionsRenderer = new google.maps.DirectionsRenderer({draggable: true, map: store.getState().map});
tempDirectionsService.route({
origin: partPath[0],
//waypoints: waypointsArray,
destination: partPath[partPath.length-1],
travelMode: 'WALKING',
avoidTolls: true
}, (res, status) => {
resolve(res);
});
});}
function getParts(response){
let distances = [];
let legs = response.routes[0].legs;
for(let i=0; i<legs.length; i++){
let steps = legs[i].steps;
let distanceCounter = 0;
let partsCounter = 0;
let startNextIndexes = [0];
for(let j=0; j<steps.length; j++){
distances.push(steps[j].distance.value);
distanceCounter += steps[j].distance.value;
if(distanceCounter > 100000 || j === steps.length-1){
startNextIndexes.push(j+1);
let partPath = [];
distanceCounter = 0;
console.log(`if HIT ${j}`);
for(let k=startNextIndexes[partsCounter]; k<=j; k++){
for(let l=0; l<steps[k].path.length; l++){
partPath.push(steps[k].path[l]);
}
}
getSinglePart(partPath).then((res) => {
console.log('then');
console.log(res);
});
}
}
}}
是文件夹,robocopy期望C:\Logs
参数的日志文件。
您需要使用命名日志文件更新命令,例如:/log: