codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  UNC Path or Mapped Drive with FSO  DJGray at 20:46 on Monday, April 05, 2004
 

VERY new to asp...

I need to walk a folder that is on a company standard mapped drive "Z:" drive. I have tried to do this with UNC and the mapped drive name as follows:

' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder("\\machinename\pathname")



as well as this way:

' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder("z:\myfolderpath")


and even tried passing it as a variable defined each way:

' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder(sDocumentPath)


In evey case, I get an error message pointing to the line with the path information on it stating that the path is "not found."

Does ASP not support UNC paths or mapped drives?



  Re: UNC Path or Mapped Drive with FSO  Troy Wolf at 21:07 on Monday, April 05, 2004
 

I do not see any errors in your code, and yes, the FileSystemObject does allow both UNC and Drive Letter mapping. Your problem is probably a user privilege issue. You probably need to give the IUSR account privileges to the folder you want to work with.

By default the account used by IIS for anonymous access is IUSR_COMPUTERNAME. So if your computer is named "FRED", then the account would be IUSR_FRED. Right click the folder, select Security, and add the IUSR account.
Troy Wolf: site expert
SnippetEdit Website Editor


  Re: UNC Path or Mapped Drive with FSO  DJGray at 20:21 on Tuesday, April 06, 2004
 

Thanks Troy. I'll do as you said and see what happens. It is good to know that the support for UNC is there so at least there IS a solution. I'll wrestle the tiger till I win! ;-)

  Re: UNC Path or Mapped Drive with FSO  kevp75 at 21:30 on Monday, May 16, 2005
 

I am having the same problem, except I am not on a domain, but rather a workgroup (I only have 2 PC's)

I have tried everything, including adding the IUSR_machinename to my other machine. As well as installing IIS on it...still no dice.

  Re: UNC Path or Mapped Drive with FSO  JulianaCR at 17:51 on Tuesday, July 12, 2005
 

Where you able to solve this issue. I'm having the same problem.



  Re: UNC Path or Mapped Drive with FSO  kevp75 at 18:26 on Tuesday, July 12, 2005
 

Unfortunately I have not, however I have been searching around for a solution.

Basically all I have been able to come up is the computers need to be in a domain, and the IUSR_machinename of the IIS server needs to be spoofed as a user on the networked machine.

I am not able to try this out, as I only have a 2 PC network, but I would be very interested if anyone else has been able to do this sucessfully.


  Re: UNC Path or Mapped Drive with FSO  Luke at 07:12 on Wednesday, July 27, 2005
 

I think the only way to get around this in your situation is called something like credential matching.
The theory goes something like:

Setup identical users on both machines that have exactly the same username and password.

In IIS directory security tab of your website manually set the Anonymous access account to this new user.

Grant the user of the same name on the other machine access to all the necessary folders.

I've haven't tried this myself but I've read something about it before.
Sorry I couldn't help more but hopefully this will give you some ideas.

  Re: UNC Path or Mapped Drive with FSO  alexdenipaul at 18:24 on Monday, October 12, 2009
 

Word Document files are not just for words any more. Documents are now crafted with embedded images. There could be just one, or dozens of images in a single document mortgage payment calculator. And sometimes, you want to save those image files as separate documents, to use outside of Microsoft Word. The creator of the document may not always be able to provide them. How do you separately save images embedded in a Microsoft Word document?

The “obvious” way would be to right-click the image and select the “Save Image As” tab, for each image you want to save. You could individually copy and paste each image into an image program, and save them there. It’s even possible to create or borrow a macro program to seek and save images from Microsoft Word documents. All of these tactics, however, are both time- and labor-intensive. The quickest and easiest ways to save embedded images as individual files are to unzip the .docx file, if you are using Word 2007, or to save the Word document as a web page, if you use Word 2000, 2002/XP, or 2003 cheap travel insurance.

The easiest way to save embedded files as separate files is to unzip the Microsoft Word file. You need Word 2007 to do this. Microsoft rolled out a .docx file format based on XML when they released Word 2007. This format acts as a ZIP folder, holding a collection of XML files, and all the embedded elements including graphs, charts, and images. Here are the steps to easily access image files using this process:

* If the file isn’t already saved as a Word Document file, open the file in Word 2007 and save it as a .docx file.
* Then, on the original filename, change the file extension from .docx to .zip.
* Open the file with your favorite ZIP application.
* You can now select all the image files you like, and move or copy them to another folder mobile homes for sale.

If you have an earlier version of Microsoft Word than 2007, you cannot unzip it using this tactic, so you must save it as a web page to save the embedded images separately. To save the document file as a web page, using Words 2000, 2002/XP, or 2003, there are a few simple steps.

* Open the Microsoft Word document.
* Using the File toolbar, select “Save As” and navigate to the folder you’d like the document saved in as a web page.
* Using the “Save As” drop-down, select “Web Page” (.htm or .html) and name and save the document.

Word will automatically create a file folder to hold all of the images in your document commercial mortgage. It saves all the image files in a subfolder, in the same file location as the main document file in .htm format, so you can easily find the images – or any other supporting files connected to the document. It’s that simple.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
• C++
• Re: refresh parent after closing pop up window
• Dynamic Insertion
• Date and Time function around the world???
• Significant Factors
• Perl array access
• Re: huffman encoding and decoding in C++...
• Perl One Liner: Replace {(
• Re: html including php, accessing the functions


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009