Commit 2964010f authored by Ahmad Nemati's avatar Ahmad Nemati

git pull

parent 66304514
......@@ -30,26 +30,27 @@ 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)
//
//
// }
if (files[i].includes('Lp1_'+config))
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')
console.log(file)
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)
}
// if (files[i].includes('Lp1_'+config))
// 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