Commit 4b518298 authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent ddecada2
...@@ -13,7 +13,7 @@ async function init() { ...@@ -13,7 +13,7 @@ async function init() {
let com = await fs.readFileSync('newCom.json', 'utf8'); let com = await fs.readFileSync('newCom_last.json', 'utf8');
files = await fs.readdirSync('E:\\YashilFinal') files = await fs.readdirSync('E:\\YashilFinal')
com = JSON.parse(com) com = JSON.parse(com)
// console.log(com) // console.log(com)
...@@ -30,25 +30,25 @@ async function renamer(config,newName) ...@@ -30,25 +30,25 @@ async function renamer(config,newName)
{ {
for (let i=0;i<files.length;i++) for (let i=0;i<files.length;i++)
{ {
if (files[i].includes(config+'_')) // if (files[i].includes(config+'_'))
{ // {
let file = await fs.readFileSync('E:\\YashilFinal\\'+files[i], 'utf8') // let file = await fs.readFileSync('E:\\YashilFinal\\'+files[i], 'utf8')
file = file.split('\n') // file = file.split('\n')
let arr=[] // let arr=[]
for (let j=0;j<file.length-1;j++) // for (let j=0;j<file.length-1;j++)
arr.push(file[j]) // arr.push(file[j])
// console.log(arr) // // console.log(arr)
let t='' // let t=''
for (let j=0;j<arr.length;j++) { // for (let j=0;j<arr.length;j++) {
t = t + arr[j] // t = t + arr[j]
if (j !==arr.length-1) // if (j !==arr.length-1)
t=t+'\n' // t=t+'\n'
} // }
createYAshil(files[i],t) // createYAshil(files[i],t)
//
//
} // }
// await fs.renameSync('E:\\YashilFinal\\'+files[i],'E:\\YashilFinal\\'+config+'_'+newName+'.csv' ) await fs.renameSync('E:\\YashilFinal\\'+files[i],'E:\\YashilFinal\\'+config+'_'+newName+'.csv' )
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment