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

git pull

parent ddecada2
......@@ -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')
com = JSON.parse(com)
// console.log(com)
......@@ -30,25 +30,25 @@ async function renamer(config,newName)
{
for (let i=0;i<files.length;i++)
{
if (files[i].includes(config+'_'))
{
let file = await fs.readFileSync('E:\\YashilFinal\\'+files[i], 'utf8')
file = file.split('\n')
let arr=[]
for (let j=0;j<file.length-1;j++)
arr.push(file[j])
// console.log(arr)
let t=''
for (let j=0;j<arr.length;j++) {
t = t + arr[j]
if (j !==arr.length-1)
t=t+'\n'
}
createYAshil(files[i],t)
}
// await fs.renameSync('E:\\YashilFinal\\'+files[i],'E:\\YashilFinal\\'+config+'_'+newName+'.csv' )
// if (files[i].includes(config+'_'))
// {
// let file = await fs.readFileSync('E:\\YashilFinal\\'+files[i], 'utf8')
// file = file.split('\n')
// let arr=[]
// for (let j=0;j<file.length-1;j++)
// arr.push(file[j])
// // console.log(arr)
// let t=''
// for (let j=0;j<arr.length;j++) {
// t = t + arr[j]
// if (j !==arr.length-1)
// t=t+'\n'
// }
// createYAshil(files[i],t)
//
//
// }
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