Hi
I would like to know how to write a batch file that will delete files with extensions identified by the user, so the code will need a user input parameter capability.
Anyone know of an existing n or how I should approach this?
Thanks,
Dusty.
...
Hi all,
How to send and reveice files from a ftp server ?
If any sample project or example is there ,then its easy to understand.
Thanks
...
Hi,
I'm trying to write a matrix into a text file.
In order to do that I'd like to know how to write an array into a line in the text file.
I'll give an example:
int [] array = {1 2 3 4};
I want to have this array in text file in the format:
1 2 3 4
and not in the format:
1
2
3
4
Can you help me with that?
Thanks a lot
...
Inside a folder (say c:\test) I want to delete the oldest file if the number of files are over 21.
This is what I came up with, issue is that it one time deletes the oldest file, second run it does nothing and deletes the oldest for third, continues like that. Also it doesn't care if the file amount is lower than 21, deletes even if it ...
Hi,
I am wondering if its even possible. I am returning files from database (blob) and have them as bytes array. I would like to let the user to show the data content by clicking on associated object - something like opening in the WebBrowser which automatically selects the appropriate program..but I understand I would need to save the f...
I want to insert files into mysql from php function.
The files that need to be uploaded are already present on the server, so I don't want to use the upload form.
I want to loop through the directory and get the files info into $_FILES.
Please let me know how I will get the $file into $_FILES and then call upload.
$dir_handle = @opend...
Hey
Why can't I delete files after downloading file
I get error:
file 'exfile.jpgg' because it is being used by another process.
Edit: (Here is more code)
string file_name = "pic.jpg"
WebClient client = new WebClient();
client.DownloadFile("http://picture.com/pic.jpg...
I have a list of files like this:
Test.(file1)[text].txt
Test.(file2)[text].txt
Test.(file3)[text].txt
I need to remove any "()","[]" and any ".", replace them spaces without changing the file extension. I've tried the following but it's not working:
dir C:\scratch\*.txt | % { Rename-Item $_ ($_.basename -replace "\(", " "`
-repl...
I enjoy working with WPF but I need a little more of "designer's touch" to my applications. I have been unable to find a good resource for WPF layout examples and color schemes along with the corresponding resource files.Are there any good resources out there to help developers make their applications really "pop".
...
Hi there,
On Unix, is there a command to display a file's modification time, precise to the second?
On Linux this is easily done with a "stat -c %y", which returns something like 2009-11-27 11:36:06.000000000 +0100. I found no equivalent on Unix.
...
Hello,
Is there any way to get a list of files that will be committed when I type the following?
git commit -m "my changes"
git status lists too much. I could strip out all the words, but I'd rather not. And I don't want to be told about untracked files.
I've tried
git ls-files -md
but that doesn't show files that have been re...
Hey there, How do I go about copying text inside a text file into a multidimensional character array?
supposing the text file( text_file.txt) contained
this is the first line
this is the second line
this is the third line
#include <stdio.h>
int main(void){
FILE *f;
f=fopen("text_file.txt","r");
if (f==NULL){
printf(...
How do I read into an array a string with space in it, delimited with semicolons from a textfile in the C programming language?
***from textfile***
"My Record; My Second Record; My Third"
.
.
.
fopen ...
for(i = 0; i < 3; i++) {
fscanf_s(myFile, "%s", myRecords[i].title); /* this want read the records */
}
fclo...
How do I tell in a better way how many records there are in a binary file before I open up the file and read the records into an array for example?
MyFile = fopen("DATA.dat", "rb");
i = 0;
while (feof(MyFile) == 0) {
fread(&tempReadingRecord,sizeof(tempReadingRecord), 1, file);
if (feof(MyFile) == 0 {
i++;
}
}
fclo...
How do one read different records of data that are separated with semicolons into an array in C?
from textfile: Text One; 12.25; Text Two; 5; Text Three; 1.253
fopen ...
for(i = 0; i < nrRecords; i++) {
fscanf(myFile, " %[^;];", myRecords[i].firstText); /* Ok first text*/
fscanf(myFile, "%lf", &myRecords[i].myDouble1); /* But goes...
How do you tokenize when you read from a file in C?
textfile:
PES 2009;Konami;DVD 3;500.25; 6
Assasins Creed;Ubisoft;DVD;598.25; 3
Inferno;EA;DVD 2;650.25; 7
char *tokenPtr;
fileT = fopen("DATA2.txt", "r"); /* this will not work */
tokenPtr = strtok(fileT, ";");
while(tokenPtr != NULL ) {
printf("%s\n", tokenPtr);
tokenPtr ...
Hiya All,
I need to parse and process an XML feed, unfortunately the feed is about 110mb in size (and i cannot do anything about it) but to be able to parse it i need to see the structure (or if anyone has any other ideas i'd love to hear it).
But for some reason using editplus i've been unable to open the file. I'm on a 64bit Vista Ma...
function Random_N() {
$RandomNumber = mt_rand(1, 9999);
return 'temp_file/$RandomNumber.html';
}
global $file_name;
$file_name=Random_N();
$file = fopen($file_name, 'w+');
$text=$msg1;
fwrite($file, $text);
$_SESSION['body']=$msg1;
$_SESSION['file_name1']=$file_name;
...
Hello again,how do I go about overwriting a specific line on a text file in c?. I have values in multiple variables that need to be written onto the file.
...
I have a lot of files I'm trying to rename, I tried to make a regular expression to match them, but even that I got stuck on the files are named like:
File Name 01
File Name 100
File Name 02
File Name 03
etc, I would like to add a "0" (zero), behind any of file that are less than 100, like this:
File Name 001
...