node automation for files move into another folder

26 views
Skip to first unread message

raj kumar

unread,
Apr 2, 2015, 12:44:21 AM4/2/15
to nod...@googlegroups.com
  • Is it possible to write the same shell script file in node js

    • providing my code below

    cd /home/webapps/project1/folder1 for f in *.csv do cp -v $f /home/webapps/project1/folder2/${f%.csv}$(date +%m%d%y).csv done

    • what I am trying to achieve is given below

I have a folder in my server which contains some files. These are automated that means everyday we get new files automatically which will overwrite the old ones. So want to take a back up for this data. How can i copy all these files in to a another folder by renaming the files with current date while copying.

Francesco Cioffi

unread,
Apr 2, 2015, 9:48:57 AM4/2/15
to nod...@googlegroups.com
Maybe you can use:



Bye.

Inviato da iPad
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/9e88b016-a8b1-4a30-bd0d-d740fd3c41e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages