Accessing and manipulating files on external server

Last post 08-29-2008 5:04 PM by overcast. 4 replies.

Sort Posts:

  • Accessing and manipulating files on external server

    08-29-2008, 1:43 PM
    • Member
      point Member
    • overcast
    • Member since 08-29-2008, 1:29 PM
    • Posts 5

    I have an in-house tool page that I would like to keep with all the other in-house web tools on one specific server.  However, it needs to be able to open a text document that resides on another server and then change it's name with a timestamp and move it to a different folder on that other server for archive.

    Now, I can do the download and file manipulation all locally.  And I know how to do the upload to the external server afterwards as well.  But the old file will still remain where it was prior to download.

    So I'm looking for a way to either remotely change the file name and move it to another folder OR delete the old file remotely after I do the download, manip. and uploading.

    Please note:  I'm not looking for the exact code to do this.  I don't want anybody solving all of the syntax for me.  I just want a good hint/direction/Class to use.  Or a solid "No, you can't do that" answer will suffice as well.

     Thank you.

  • Re: Accessing and manipulating files on external server

    08-29-2008, 2:02 PM
    • Contributor
      2,242 point Contributor
    • MajorCats
    • Member since 08-30-2002, 1:13 PM
    • Kansas City, MO USA
    • Posts 457

    Does it have to be a web app? 

    Do you have access to the other server via a network? 

    What causes you to do the process?  I mean, is it something that can be determined before hand, like your checking the file datestamp to see how old it is and then archiving files over x number of days, or is it determined by user input? 

    Does the remote box run IIS? 

    Do you have control of the remote box?

    MajorCats
  • Re: Accessing and manipulating files on external server

    08-29-2008, 4:13 PM
    • Member
      point Member
    • overcast
    • Member since 08-29-2008, 1:29 PM
    • Posts 5

    yes

    yes, both are in-house servers

     determined by user input via a button on the site (although I have been toying with the idea of doing it autonomously based on a certain time period)

    yes

    for the most part

     

    But in the end, can you manipulate files externally with a fair amount of ease?  or does it require major code to bypass security measures and such.  It seems like the latter is the only way to go, but I was hoping that someone knew of a process that allowed a faily simple means to bypass the security of an owned system.  And the actual functionality (classes?) that operate this kind of behaviour.

  • Re: Accessing and manipulating files on external server

    08-29-2008, 4:31 PM
    Answer
    • Contributor
      2,242 point Contributor
    • MajorCats
    • Member since 08-30-2002, 1:13 PM
    • Kansas City, MO USA
    • Posts 457

    Well, this might or might not work for you depending on the particulars of your environment and requirements...but we had a similar thing we needed to do (if i am understanding what you are saying) and here is what we did.

    First, we created an active directory group that had permissions that were needed to all the various directories.  Then we added a specific user to that group.  We setup a scheduled job that ran an executable every x seconds.  The scheduled job was setup to run with the id we had added to the active directory group so that the executable would inherit the permissions it needed to the various directories. 

    The executable reads "job" files that are placed in a directory.  The job file tells the executable what file we want to play with and what operation we want it to do, etc...

    The web interface is used to gather the requirements from the user and then write a job file.

    As you can see, there is a small delay between when the user submits the information and when the actual work takes place, so this might not be right for you if you need a response back to the user from the web app.  In that case, you might consider a web service installed on your remote server.  You could then send requests from your web interface to the web service and your web service could then manipulate the file and return a success\failure message or something similar.

     

    MajorCats
  • Re: Accessing and manipulating files on external server

    08-29-2008, 5:04 PM
    • Member
      point Member
    • overcast
    • Member since 08-29-2008, 1:29 PM
    • Posts 5

    I think I understand what you're telling me.  And that pretty much gives me my course of action.

    This functionality is not that important to set up an entire web service for.  I think i will go the harder route of just putting the page on the server with that file itself.  Thank you for your input.

Page 1 of 1 (5 items)