Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help - is this possible !!?

Status
Not open for further replies.

Lockstock2SB

Technical User
Oct 29, 2001
53
GB
HI All !

I am really stuck with this project i am trying to do. I need an entriely web based way to upload files to a webserver and then get them moved to a secure server once the 2nd stage user has ok'd them. I have managed to get the files uploaded to the webserver (by a 1st stage user), and i have a page where the 2nd stage user can go to and view a list of files currently on the server and approve the ones that need to go to the secure server.

The way i have been trying to do it so far is to have a check box by each file, and the user ticks each file they want moved to the secure area. They click the submit button when they are ready to move them. This is where my problem starts. I think the problem is in the multiple checkboxes - they all have the same name so are treated as one long string. Long and short of it is i have been messing around trying to make some way of dynamically numbering each checkbox when a new file has been added and displayed on the page. But i am in over my head ! as i dont really know what i am doing lol


How can i use this page to tick off the files i want and move only the ticked files from the webserver to another location ?

Any help would be greatly appreciated !!

Thanks

Steve
 
>>How can i use this page to tick off the files i want and move only the ticked files from the webserver to another location


the checkboxes are generated along with the files list right?

<input type="checlbox" name="TheFiles" value="<%=TheFileName%>">


this will make the checkboxes to hold the respective file names. when the user checks more than one u will get a "," seperated value like:
File1, File2,...

split at "," and voila u have the files the user has checked...

Known is handfull, Unknown is worldfull
 
>>How can i use this page to tick off the files i want and move only the ticked files from the webserver to another location


the checkboxes are generated along with the files list right?

<input type="checlbox" name="TheFiles" value="<%=TheFileName%>">


this will make the checkboxes to hold the respective file names. when the user checks more than one u will get a "," seperated value like:
File1, File2,...

split at "," and voila u have the files the user has checked...

Known is handfull, Unknown is worldfull
 
Hiya :)
Yep you have got it right - the check boxes are created at the time that it reads the file. The code for this is :

Response.Write("<input type='checkbox' name='FileName' value='"& FileIndex.name &"'>" & "<A HREF='" & "hold/" & FileIndex.name & "'>" & FileIndex.name & "<BR>")

THis produces the list of files, seperated by "," as you said. This is where i am ok though. The problem is what do i do with that next in order to target the files included that string and actually shift them from one location to another ?

Here is what gets passed to a dummy page :


Thanks again

steve
 
>> actually shift them from one location to another

now shifting files from one server to another is a tricky job sometimes u cn use the plain fos object but i think u would require the wshell.networking (or something like that). the code can be found in the VB forum (try a search for networking) and implemented in ASP...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top