473,221 Members | 1,891 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,221 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 12333

"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
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.