News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

*.out file

Started by P_C, February 08, 2011, 05:38:14 PM

Previous topic - Next topic

P_C

Hi!
I want to make a *.out file for my program but the Pelles C command prompt says "access denied".
So what to do? because i need to show my program to the teacher.

Vortex

Hi P_C,

Is there a NTFS permisson issue on the folder where you want to create the output file?
Code it... That's all...

P_C

I don't know, how to check that?

Stefan Pendl

What is the path you like to put your file in?
What Windows version are you running on?
---
Stefan

Proud member of the UltraDefrag Development Team

P_C

#4
the path is C:\Users\x\Documents\Pelles C Projects\
and I am running on Win7 64bit.

Stefan Pendl

So you are saving to your own documents?

There should be no problem doing so, if the file does not exist and is not used by another program.
---
Stefan

Proud member of the UltraDefrag Development Team

CommonTater

Quote from: Stefan Pendl on February 08, 2011, 09:50:14 PM
So you are saving to your own documents?

Two things may be of note here...
1) does that folder actually exist? 
2) some command line tools have problems with spaces in path names.

P_C

I am typing "goto *path*" and then "*.exe>*.out" and it says access denied. maybe i am wrong?

CommonTater

Exactly what are you typing... a screenshot would be good...

Vortex

Quote from: P_C on February 08, 2011, 09:18:27 PM
the path is C:\Users\x\Documents\Pelles C Projects

Your project files are under your profile folder so you shouldn't have NTFS permisson issues.
Code it... That's all...


Stefan Pendl

Goto does not change the folder, but jumps to a mark when used inside a batch file.

You need to use CD (change directory) instead.

The program files folder structure is write protected, only installers are allowed to write there.
---
Stefan

Proud member of the UltraDefrag Development Team

Bitbeisser

Quote from: Stefan Pendl on February 09, 2011, 10:44:09 PM
Goto does not change the folder, but jumps to a mark when used inside a batch file.

You need to use CD (change directory) instead.

The program files folder structure is write protected, only installers are allowed to write there.
Well, that's not the problem here though, don't know if the fact that goto works here in the first place is a new thing in Windows 7 (Vista?).

The main issue is that he expects to be able to execute an .out file and that is certainly not going to happen. It has to be a .com or .exe file, after all this ain't Linux/Unix he's running on. Not sure if Windows 7/Vista is still recognizing the .cmd extension as it was used in early NT and OS/2...

Ralf

CommonTater

#13
I'm on win7 and goto does what it always has... jumps to a label inside a batch program.

The correct command is CD  or CHDIR followed by the path where you want to be.
You will know when it works because the path showing to the left of the cursor will change to match your target...


start a shell...

c:\users\name> _     <--- type CD \WINDOWS
c:\Windows> _


I think the whole problem is that he's just not getting into the right directory.

Bitbeisser

Quote from: CommonTater on February 12, 2011, 02:07:23 AM
I'm on win7 and goto does what it always has... jumps to a label inside a batch program.

The correct command is CD  or CHDIR followed by the path where you want to be.
You will know when it works because the path showing to the left of the cursor will change to match your target...


start a shell...

c:\users\name> _     <--- type CD \WINDOWS
c:\Windows> _


I think the whole problem is that he's just not getting into the right directory.





c:\CD C:\
My bad, you're right, the goto doesn't even work as I wrongly assumed it could.
I was checking the forum earlier from my Android phone, and didn't see the blackslashes and pointy brackets right.

He is not actually changing the directory to his project folder and then tried to execute the exercize4c.exe in "C:\Program Files\Pelles C", with an attempted redirection of it's possible output to the file exercize4c.out.

What more so was throwing me off is that the GOTO command doesn't throw an error message about a non-existing label and unless the exercize4c.exe is indeed in the current folder, I would have expected an error message like "command not found" when trying to execute the file in the wrong folder...  ???

Ralf