M
Merlin
Ok....
I feel really dumb on this one, because I had previously figured it
out, and now don't have a clue.
I'm trying to get the user to input a new filename (via an integer
variable) and have that variable passed to rename, so that the file can
be named whatever the user specifies in the console window....
Currently using
#include <stdio.h>
main()
{
int filename;
printf("Please input a new filename");
scanf("%d",filename);
rename("testfile.txt","%d.zip");
system("pause");
}
but obviously doesn't work. Example assumes that the prog. is being run
from the same working folder as the file in question.
This is just the experiment that I was running. Don't know how to make
this work. Any help would be greatly appreciated.
Sorry the questions are so basic...if anyone knows of a better group,
let me know, and I'll post there.
Merlin.
I feel really dumb on this one, because I had previously figured it
out, and now don't have a clue.
I'm trying to get the user to input a new filename (via an integer
variable) and have that variable passed to rename, so that the file can
be named whatever the user specifies in the console window....
Currently using
#include <stdio.h>
main()
{
int filename;
printf("Please input a new filename");
scanf("%d",filename);
rename("testfile.txt","%d.zip");
system("pause");
}
but obviously doesn't work. Example assumes that the prog. is being run
from the same working folder as the file in question.
This is just the experiment that I was running. Don't know how to make
this work. Any help would be greatly appreciated.
Sorry the questions are so basic...if anyone knows of a better group,
let me know, and I'll post there.
Merlin.