473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

FileSystemObject: Permission denied??

Hi,
I got the err below, nevertheless my folders have full permissions for all.

Permission denied
/vilmar/ASP_JavaScript_CSS_HTML/ajudas_asp_completos/novo_asp/novo_asp_4-12-
03/Objeto_FileSystemObject.asp, line 17

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set Arquivo = objFSO.CreateTextFile("c:\Texto_teste.txt", True)
Arquivo.WriteLine("Isto é um texto." & vbcrlf & "Outra linha do texto e " &
vbcrlf & "....outra linha do texto.")
Arquivo.Close
Set Arquivo = objFSO.GetFile("c:\Texto_teste.txt")
Arquivo.Move "D:\Testes_Apostilas" ' »»line 17

Thanks,

««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
Jul 19 '05 #1
4 12344

"Vilmar Brazão de Oliveira" <su*****@hitecnet.com.br> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
.. . .
Set Arquivo = objFSO.GetFile("c:\Texto_teste.txt")
Arquivo.Move "D:\Testes_Apostilas" ' »»line 17


To move a File into a Directory, I think that should be

Arquivo.Move "D:\Testes_Apostilas\"

HTH,
Phill W.
Jul 19 '05 #2
IUSR_MachineName is unlikely to have permissions to read/write to c:\ or
d:\, and probably for good reason. Why not create the file in the web
structure, e.g.

Set Arquivo = objFSO.CreateTextFile(Server.MapPath("Texto_teste. txt"), True)

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Vilmar Brazão de Oliveira" <su*****@hitecnet.com.br> wrote in message
news:##**************@TK2MSFTNGP10.phx.gbl...
Hi,
I got the err below, nevertheless my folders have full permissions for all.
Permission denied
/vilmar/ASP_JavaScript_CSS_HTML/ajudas_asp_completos/novo_asp/novo_asp_4-12- 03/Objeto_FileSystemObject.asp, line 17

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set Arquivo = objFSO.CreateTextFile("c:\Texto_teste.txt", True)
Arquivo.WriteLine("Isto é um texto." & vbcrlf & "Outra linha do texto e " & vbcrlf & "....outra linha do texto.")
Arquivo.Close
Set Arquivo = objFSO.GetFile("c:\Texto_teste.txt")
Arquivo.Move "D:\Testes_Apostilas" ' »»line 17

Thanks,

««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC

Jul 19 '05 #3
> Arquivo.Move "D:\Testes_Apostilas" ' »»line 17

In addition to my other comment, I believe you need a source and a
destination with the Move command. I also have always used FSO for this,
rather than grabbing an additionl file handle.

objFSO.movefile "c:\Texto_teste.txt", "d:\Testes_Apostilas\Texto_teste.txt"

However, as I stated before, why are you putting these things on the roots
of hard-coded drives? And why create and then move... why not just create
it where you want it?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #4
Thank you Phill and others,
I had forgot the inverted bar \ »» Arquivo.Move "D:\Testes_Apostilas\"

Regards,
Vilmar
Brazil

"Phill. W" <P.A.Ward@o-p-e-n-.-a-c-.-u-k> escreveu na mensagem
news:br**********@yarrow.open.ac.uk...

"Vilmar Brazão de Oliveira" <su*****@hitecnet.com.br> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
. . .
Set Arquivo = objFSO.GetFile("c:\Texto_teste.txt")
Arquivo.Move "D:\Testes_Apostilas" ' »»line 17


To move a File into a Directory, I think that should be

Arquivo.Move "D:\Testes_Apostilas\"

HTH,
Phill W.

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark | last post by:
I'm having intermittent trouble with the Scripting.FileSystemObject. Basically, I'm stress testing my ASP application and using the FSO to output lots of instrumentation/debug information to the...
1
by: Scott MacLean | last post by:
I'm pulling my hair out over this one. I've got a web page that I need to have write to another server across the network. The site in question does NOT run in anonymous mode, that is, the user is...
4
by: Katja | last post by:
Dear all, I have a script that creates a FileSystemObject to be used for folder/directory manipulation. What I am trying to do is to search the drive if folder exist. If it doesn't it creates a...
0
by: bart plessers | last post by:
Hello, I want to list my folders with ASP. I use following script to achieve this: Set oFSO = Server.CreateObject("Scripting.FileSystemObject") Set oRoot = oFSO.GetFolder(Path) Set oFolders =...
5
by: Brad Wood | last post by:
The delete method of the FileSystemObject.FileObject does not return a result. If permissions disallow deletion, it will not raise an error. Conversely, if the delete method does succeed, a call...
4
by: StumpY | last post by:
Hi I am trying to append information collected from a form into a text file (already created and currently in the root of my web) on my ISP's webserver. The code snippet causing the problem is;...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
0
by: private.anders | last post by:
Hi David! Really need assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
0
by: private.anders | last post by:
Really need your assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.