Jump to content

Check how many files on a server are named "xxx"?...


ShootingBlanks

Recommended Posts

Hello.  I'm very new to JS, so this may not be a difficult thing...

 

I have a bunch of files on a server that start with "ds_" then have a number then ".php".  So, "ds_1.php", "ds_2.php", "ds_3.php", etc.  The numbers are all in succession (and the first one will always be "ds_1.php"), but the total number that exist changes regularly.  I need a "for" loop in javascript that will run through as many "ds_x.php" pages there are.

 

So if there are pages for "ds_1.php" through "ds_5.php", then I need code that says:

 

"For every page on the server from ds_1.php through ds_5.php, do something."

 

Thanks for any help that can be offered!!!  :)

I don't think there is any way of doing that as far as i know.

 

But here's me thinking this would be easier to do with a simple php loop and inline the JS script in it.

 

Not very efficient but should do the job.

 

Yeah - I figured that would be the solution.  Just checking if there was another way.  Thanks, though!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.