NO

Author Topic: *.out file  (Read 3227 times)

P_C

  • Guest
*.out file
« on: February 08, 2011, 05:38:14 pm »
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.

Offline Vortex

  • Member
  • *
  • Posts: 501
    • http://www.vortex.masmcode.com
Re: *.out file
« Reply #1 on: February 08, 2011, 08:26:51 pm »
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

  • Guest
Re: *.out file
« Reply #2 on: February 08, 2011, 08:55:23 pm »
I don't know, how to check that?

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 566
    • Homepage
Re: *.out file
« Reply #3 on: February 08, 2011, 09:09:40 pm »
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

  • Guest
Re: *.out file
« Reply #4 on: February 08, 2011, 09:18:27 pm »
the path is C:\Users\x\Documents\Pelles C Projects\
and I am running on Win7 64bit.
« Last Edit: February 08, 2011, 09:21:17 pm by P_C »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 566
    • Homepage
Re: *.out file
« Reply #5 on: February 08, 2011, 09:50:14 pm »
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

  • Guest
Re: *.out file
« Reply #6 on: February 09, 2011, 02:46:59 am »
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

  • Guest
Re: *.out file
« Reply #7 on: February 09, 2011, 02:40:47 pm »
I am typing "goto *path*" and then "*.exe>*.out" and it says access denied. maybe i am wrong?

CommonTater

  • Guest
Re: *.out file
« Reply #8 on: February 09, 2011, 03:03:06 pm »
Exactly what are you typing... a screenshot would be good...

Offline Vortex

  • Member
  • *
  • Posts: 501
    • http://www.vortex.masmcode.com
Re: *.out file
« Reply #9 on: February 09, 2011, 09:23:26 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...

P_C

  • Guest
Re: *.out file
« Reply #10 on: February 09, 2011, 10:21:17 pm »

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 566
    • Homepage
Re: *.out file
« Reply #11 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.
---
Stefan

Proud member of the UltraDefrag Development Team

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 754
Re: *.out file
« Reply #12 on: February 12, 2011, 01:32:47 am »
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

  • Guest
Re: *.out file
« Reply #13 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...

Code: [Select]
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.
« Last Edit: February 12, 2011, 12:44:23 pm by CommonTater »

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 754
Re: *.out file
« Reply #14 on: February 12, 2011, 04:18:05 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...

Code: [Select]
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