如果文件夹不存在,则在vbs中创建文件夹

时间:2017-09-01 17:29:07

标签: windows vbscript server

所以我正在使用vbs脚本,我不断收到错误800a3ee这是我认为的参数错误。它说它需要")"在发布的行中。我希望第二眼可以帮助我。

如果当前文件中没有文件夹,则下面的代码会创建一个文件夹。

If Not objFSO.FolderExists(sBackupFolder & iDate) then      
    objFSO.CreateFolder(sBackupFolder & "\" & Instance & "_" iDate)
    objFSO.CopyFolder sSourceFolder, sBackupFolder & "\" & Instance & "_" iDate, OVER_WRITE_FILES

1 个答案:

答案 0 :(得分:2)

您忘记了import orm from './../../orm/orm'; import * as types from '../../actions/actionTypes'; const loadCities = (state, action) => { // Create a Redux-ORM session from our entities "tables" const session = orm.session(state); // Get a reference to the correct version of model classes for this Session const { City } = session; const { cities } = action.payload; // Clear out any existing models from state so that we can avoid // conflicts from the new data coming in if data is reloaded City.all().toModelArray().forEach(city => city.delete()); // Immutably update the session state as we insert items cities.forEach(city => City.parse(city)); return session.state; }; const updateCity = (state, payload) => { const { id, newItemAttributes } = payload; const session = orm.session(state); const { City } = session; if (City.hasId(id)) { const modelInstance = City.withId(id); modelInstance.update(newItemAttributes); } return session.state; }; const deleteCity = (state, payload) => { const { id } = payload; const session = orm.session(state); const { City } = session; if (City.hasId(id)) { const modelInstance = City.withId(id); // The session will immutably update its state reference modelInstance.delete(); } return session.state; }; const createCity = (state, payload) => { const { city } = payload; const session = orm.session(state); const { City } = session; City.parse(city); return session.state; }; const citiesReducer = (dbState, action) => { const session = orm.session(dbState); switch (action.type) { case types.LOAD_CITIES_SUCCESS: return loadCities(dbState, action); case types.CREATE_CITY_SUCCESS: return createCity(dbState, action); case types.UPDATE_CITY_SUCCESS: return updateCity(dbState, action); case types.DELETE_CITY_SUCCESS: return deleteCity(dbState, action); default: return session.state; } }; export default citiesReducer; &之间的"_",将其更改为iDate