0

I have a folder that receives 15 different files each day, with differences in the name each day. The only common thing each day is the file extension (.pdf for all files).

I'm trying to figure out how to use javascript or jquery to move all files ending in .pdf from one folder to another.

I'd prefer using one of these options if possible in lieu of a batch file or other option.

Does anyone have any suggestions?

Thanks!

Paul
  • 26,170
  • 12
  • 85
  • 119
Surreall
  • 3
  • 1
  • 2
  • 1
    If you want to move files around on your personal computer, that is not a web server, you need to write a script file. There are various languages that can do this, but nothing you can run in a web browser like jQuery or browser Javascript. Some people use [python](http://stackoverflow.com/questions/8858008/moving-a-file-in-python) – Paul Oct 04 '14 at 04:05

3 Answers3

0

I Feel that these actions cant be performed at client side i.e., through client side java script/jquery These kind of operations should be perfomed at serverside

Below post might be helpful

How to use file system or operation using javascript or Jquery?

Community
  • 1
  • 1
pathfinder
  • 127
  • 4
  • 18
0

The task you are talking about is done by Server side programming like PHP . Or if you want to stick with Javascript you love , use Node.js

If you love js or node js Check THIS

Community
  • 1
  • 1
Pratik Joshi
  • 11,485
  • 7
  • 41
  • 73
0

You cannot move a file from one folder to another using client-side Javascript, or any client-side javascript library such as Jquery. You need to use a server side programming language for that. If you don't want to write a batch script, you may want to write a PHP program or a Java program, or basically a program using server side programming language.

Parth
  • 367
  • 6
  • 18
  • 2
    He can use SERVER side javascript ,So not necessary to use Old Server side programming PHP if he really wants to do with javscript , Server side JS like node js – Pratik Joshi Oct 04 '14 at 04:01
  • Ok thanks. I thought maybe it was possible since I can move single files with file.move() or copy them with file.copy(). Think I may just do a batch script instead. – Surreall Oct 04 '14 at 17:15