f



Create Files/ Upload Files

Hi

Can anyone explain by example how to create a new file on server and
then upload some files to that newly created folder?

But before we create the file check that an existing file does not
already exist and then upload the files to the newly created
directory.

Thanks
Baka

0
bakasa (1)
6/26/2007 2:49:01 PM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

2 Replies
1021 Views

Similar Articles

[PageSpeed] 43

On Jun 26, 7:49 am, abhm <bak...@gmail.com> wrote:
> Hi
>
> Can anyone explain by example how to create a new file on server and
> then upload some files to that newly created folder?
>
> But before we create the file check that an existing file does not
> already exist and then upload the files to the newly created
> directory.
>
> Thanks
> Baka


To get started, look at the manual page for the file command. file
mkdir,
for example, creates a folder. file exists tests for the existence of
a file.

0
billposer (379)
6/26/2007 11:29:49 PM
At 2007-06-26 10:49AM, "abhm" wrote:
>  Hi
>  
>  Can anyone explain by example how to create a new file on server and
>  then upload some files to that newly created folder?
>  
>  But before we create the file check that an existing file does not
>  already exist and then upload the files to the newly created
>  directory.

Here's an example of how to send a file upload *to* a URL:
    http://aspn.activestate.com/ASPN/Cookbook/Tcl/Recipe/109363

To write a CGI script that receives an uploaded file, see:
    http://tcllib.sourceforge.net/doc/ncgi.html

-- 
Glenn Jackman
"You can only be young once. But you can always be immature." -- Dave Barry
0
glennj (645)
6/26/2007 11:55:41 PM
Reply:

Similar Artilces:

Sourcing a TCL file from within a tcl file
I am a newbie which I am sure I don't need to state :) I am trying to create a variable with a TCL file that will source another tcl file when I type the variable name something like this if I enter A through my keyboard then source a.tcl Can someone show me how to do this thanks guy On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > I am a newbie which I am sure I don't need to state :) > > I am trying to create a variable with a TCL file that will source > another tcl file when I type the variable name > > something like this > > if I enter A through my keyboard =A0then source a.tcl > > Can someone show me how to do this > > thanks > guy What you are asking is not hard. Will your program have a graphical user interface? Aric On Dec 10, 3:26=A0pm, Aric Bills <aric.bi...@gmail.com> wrote: > On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > > > I am a newbie which I am sure I don't need to state :) > > > I am trying to create a variable with a TCL file that will source > > another tcl file when I type the variable name > > > something like this > > > if I enter A through my keyboard =A0then source a.tcl > > > Can someone show me how to do this > > > thanks > > guy > > What you are asking is not hard. =A0Will your program have a graphical > user interface? > > Aric no I am just using this script...

How to create log file and command journal files for a TCL session
I am using TCL as the command language for my C++ application. How do I add the following? 1. Command journal file that records all TCL commands that the user issues during the session. The purpose of this file is to allow someone to reproduce the same command sequence at a later time. 2. Log file that contains everything that was displayed to the user by my application, as well as by TCL. In other words, everything that was output to stdout and stderr. I can imagine how to do this with a redirect, but I wonder if there is something more straightforward. Thank you for your help with one or both of these questions. google@voom.net wrote in news:1159952849.982836.16970@e3g2000cwe.googlegroups.com: > I am using TCL as the command language for my C++ application. How do > I add the following? > > 1. Command journal file that records all TCL commands that the user > issues during the session. The purpose of this file is to allow > someone to reproduce the same command sequence at a later time. > > 2. Log file that contains everything that was displayed to the user by > my application, as well as by TCL. In other words, everything that > was output to stdout and stderr. I can imagine how to do this with a > redirect, but I wonder if there is something more straightforward. > > > Thank you for your help with one or both of these questions. > > 1.) In a former job I had that problem myself, trying to hack geometry...

File upload servlet using MultipartRequest
Hello All, I am playing with Jason Hunter's MultipartRequest servlet to upload a file to a server (Tomcat). However, the file is not appearing on the server. I have added some println statements to FilePart.writeTo(File fileOrDirectory). Everything appears as I would expect - the filename and path are correct, and the number of bytes returned by the method looks fine. But no file appears on the server. Has anyone else experienced this? Many thnaks in advance, Paul Actually the file does make it to the server, it just wasn't in the directory I expected, given what parameters I was pa...

Q: File Exchange --- posted file not there yet. Should I upload file again?
I posted a file to the file exchange yesterday, but it is not showing up yet. How long does it usuallly take for the file to show up? Should I upload it again or wait? James Tursa James Tursa <aclassyguywithaknotac@hotmail.com> wrote in message <f058j3h10e632t855riru5bocpodhvgu3k@4ax.com>... > > I posted a file to the file exchange yesterday, but it is not showing > up yet. How long does it usuallly take for the file to show up? Should > I upload it again or wait? > > James Tursa It can take a few days depending on workload, holidays/weekends, sick days etc....

Creating a TCL Channel from a C FILE* giving strange file handles
Hey Everybody! Having a problem with the Tcl C Library calls I cant seem to= figure out. I'm trying to create a channel from opened FILE *, and use it = in a TCL script that sources the module. So, what I am running so far is: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D int openCFileCmd(ClientData clientData,=20 Tcl_Interp *interp, int objc, Tcl_Obj *CONST o= bjv[])=20 ...

upload file error 3: "The uploaded file was only partially uploaded"
I've a file that starts like this: <form id="pdsForm" method="post" action="/mcControlPanel.php" class="mcForm" charset="UTF-8" enctype="multipart/form-data" > and it contains this input: <input id="biopic" name="biopic" type="file" /> The script recieving it does this: $biopic = $this->core->getVar("biopic"); if (is_array($biopic)) { print_r($biopic); I get: Array ( [name] => L-monkeySmall.jpg [type] => [tmp_name] => [error] => 3 [size] =&g...

File Upload issue
I am using PHP Version 4.4.3 under Linux/Apachie to upload files. The PHP.ini upload_max_filesize is 2M, which I need to override this in the HTML (see below). I changed the MAX_FILE_SIZE to 4,000,000 but the system only accepts files less than 2M. Is the override wrong, do I need to raise the limit in the PHP.ini file, or is the Apachie issue. <form name="upload" action="admin.php" method="post" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="4000000"> On Wed, 29 Nov 200...

I can not get file uploads to show up when I upload a file
I've a form that starts off like this: <form method="post" action="profile.php? id=5&formName=my_story_edit.htm" enctype="multipart/form-data"> <p>Email address:<br /> <input type="text" name="totalFormInputs[users][5][email_address]" value="lawrence@krubner.com" /></p> <p>Zip code:<br /> <input type="text" name="totalFormInputs[users][5][zip_code]" value="22902" /></p> <p>Personal image:<br /> <input type="fi...

Tcl file from .txt file
Hi, I have a excel file. I need to change the excel file in to tcl file. I did = change the excel file in to txt file. but unable to change the txt file in = to tcl file. let me know any idea to change the txt file in to tcl file or = directly from the excel file in to tcl file.=20 your help is much more appreciated. thank you. On 11/14/14, 1:30 PM, yenilsuwal@gmail.com wrote: > Hi, > > I have a excel file. I need to change the excel file in to tcl file. I did change the excel file in to txt file. but unable to change the txt file in to tcl file. let me know any idea to c...

file upload not saving file
Hello, When I upload an image to the server I get the message: Warning: Only -1 bytes were written, expected to write 547 The server phpinfo lists : file_uploads On upload_max_filesize 2M upload_tmp_dir /tmp PHP Version 4.4.1 so I created a directory named tmp at the root of my "server space" and gave it chmod 777, but still the same error occurs. This is the result of print_r($_FILES['myfile']) : Array ( [name] => 2.jpg [type] => [tmp_name] => [error] => 7 [size] => 0 ) Error 7 in the PHP manual is : UPLOAD_ERR_CANT_WRITE Value: 7; Failed to wri...

file extention from file file location
Hi, I am new to perl (only working on this one problem) but I program in other languages. We have an upload script written in cgi. Can anyone tell me how to get the file extension from the variable $File1 (actual file location on uploader's computer) then find out if it is equal to "txt" Thanks in advance for not telling me to read the manual. Ron -- PLEASE NOTE: comp.infosystems.www.authoring.cgi is a SELF-MODERATED newsgroup. aa.net and boutell.com are NOT the originators of the articles and are NOT responsible for their content. HOW TO POST to co...

What is better /standard for creating files. a cpp file with header or cpp and seperate file for header
Hello, after class, I checked the website and found that most class members had put the header inside of the cpp file. I usually create a seperate file for each. Which is better?? and if you put them in one file, the #endif goes at the end of the header part right?? Thanks for any responses. never mind, i just read a real good explanation of this in the c++ programming language. On Tue, 10 Feb 2004 08:24:36 GMT, DrUg13 <livefast@dieyoung.com> wrote: >Hello, after class, I checked the website and found that most class >members had put the header inside of the cpp file. I...

How to create PC File Description File(.FDF) for Client Access file transfer utility?
Hello Friends, I want to know how can i create PC File Description file (.FDF) that we give in File Transfer Utility of Client Access, while transfering any file from PC to AS400. What are the parameters of .FDF file and how can i create one to describe my PC file that is to be transfered? I would be grateful if you can guide me to some manual in which i can get this. Thanks in Advance for yr help in this regard. kind regards, Umer Assuming the file exists on the as400, use CA to download the file first and select create FDF option. If not, download any file and select FDF and loo...

Iteration through File.file? misses entries for which File.file?(entry) == true
Hello everyone, I'm new to Ruby, so I'm most likely making an elementary mistake. However, searching Google didn't help me find my answer, and after mucking around with irb I still haven't figured it out. I wrote a method that was intended to take all of the files in a given directory and put them into an array. Here's the code I wrote: def getFiles(dir) pwdFiles = Array.new Dir.foreach(dir) do |entry| pwdFiles.push(entry) if File.file?(entry) == true end end This works fine when called on the working directory --- that is, getFile...

Create XML file from text file
Hello all! I was wondering whether there was a way, using any XML parser (preferably xerces), to create an XML file by reading, line by line a text file. Thank you, Marios Tofarides matofarides@gmail.com wrote: > Hello all! > > I was wondering whether there was a way, using any XML parser > (preferably xerces), to create an XML file by reading, line by line a > text file. Generally not, since an XML parse, by definition, parses XML and plain text is not XML. What I've done in such situations is to write a parser for the source language (whatever kind of language i...

How to create M-file or Mex file
I am working with Fuzzy Logic Toolbox. After I completed FIS then I apply "evalfis()' to evaluate output value however I have very large set of numbers I need some easier way to put input. I know M-file or Mex-file can be applied for a given set of inputs, but I do not know how to do. Kindly give me some directions. Thanks in advance Jay Jedsada ...

How do I create a mex file from my C File?
I have this program and I need to make it a mex in matlab, how do you do it? #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> int main(int argc, char *argv[]) { char text [100]; //Declare a File Pointer FILE *file_ptr; //Open the log file file_ptr=fopen("BlackHostLog.txt", "r"); //Test if(file_ptr != NULL) { printf("BlackHostLog.txt opened.\nContents:\n"); //Read the text int passed=0; while(fgets(text, 100, file_ptr)!=NULL && !passed) { printf("%s", text); passed=strstr(text, "Sending B...

creating exe file of a m file
can anybody tell me how can we create exe file of matlab file it's urgent Hi hemant, check the manual for the MATLAB Compiler (if you have). Regards, Stefan hemant_gupta_mnit@rediffmail.com wrote: > > > can anybody tell me how can we create exe file of matlab file it's > urgent > Afraid to say you need to spend lots of money and purchase the Matlab compiler. Once you have that installed follow the online help and examples, else come back here if you are having specific problems, I am sure the guru's will offer some help. Regards Dave Robinson Use the MATLAB Compiler: http://www.mathworks.com/products/compiler <hemant_gupta_mnit@rediffmail.com> wrote in message news:1117086072.812685.289580@z14g2000cwz.googlegroups.com... > can anybody tell me how can we create exe file of matlab file it's > urgent > ...

How to create a .a ( archive ) file from multiple .a files
I m using HP UNIX I wanted to make a single archive file from multiple .a files by pulling in all the .o modules contained within each of these .a files. Thanks --sony sonyantony@hotmail.com writes: > I wanted to make a single archive file from multiple .a files by > pulling in all the .o modules contained within each of these .a files. And what is stopping you from doing that? mkdir tmp.$$ && cd tmp.$$ && ar x ../libfoo.a && ar xv ../libbar.a && ar r ../libcombined.a *.o && cd .. && rm -rf tmp.$$ Cheers, -- In order to unde...

create RTF file from ASCII file
Hi SAS Users I have recently faced the problem: I had to create RTF file from ASCII file with the following specifications: 1. Landscape orientation 2. Left margin=1.1in 3. Right margin=0.5in 4. Top margin=1in 5. Bottom margin=0.5in 6. Font=SAS Monospace 7. Font size=8 8. Space between lines=exactly 7.6pt 9. Once RTF file is opened in MSWord it should look like MSWord document, but not MSWord table (with columns and rows) It seems like ODS RTF cannot accomplish exactly what I needed. However it is possible if RTF file is build "manually". Here is the code: file...

PHP File upload
Hi, I have to allow my visitors to upload image on my site. I am using the follwoing code to do that: $uploaddir = 'admin/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile); My problem is that I expect them to use same file name, like all of them will be uploading files like, comments.rtf. So if there is already one comments.rtf the file will get overwriten... so the challenge is to rename the files to username-filename.rtf can anybody here will take the pain to modify...

create a zip file with existing files in it
I try the zip example described in the doc. It worked that way. But now I want to add existing files to a new created zip. first the code <code> void OBApp::Test () { wxFFileOutputStream out(_T("C:\\test.zip")); wxZipOutputStream zip(out); wxTextOutputStream txt(zip); // ?? wxFileInputStream strFile("C:\\autoexec.bat"); wxString sep(wxFileName::GetPathSeparator()); zip.PutNextEntry(_T("C:\\autoexec.bat")); txt << _T("Some text for entry1.txt\n"); zip.PutNextEn...

Create AMP file from ACV file?
I need to create an AMP file from an ACV file. I.e, the AMP file should contain the mapping of every pixel, as Photoshop would interpolate a given ACV file in the Curves dialog. Is there a way of doing this, without using the SDK? I am using Photoshop 7.01. Thanks, Greg. Alternatively, if the algorithm Photoshop uses to interpolate an ACV could be made available, that would be just as useful to me.(in fact, it would be easier for me to use the algorithm than an AMP file) Greg. "Greg" <nospam@nowhere.com> wrote in message news:3feaed29$1@duster.adelaide.on.net... > I nee...

create exe file from m-file
Hi! How can I generate an executable file from an m-file? Thanks a lot, Giovanni Giovanni wrote: > > > Hi! > How can I generate an executable file from an m-file? > Thanks a lot, Giovanni you need to use the compiler: help mcc etc,etc... Bryan Type this command in the matlab command prompt and set ur current directory to the work directory mcc -B sgl mfile.m this should generate mfile.exe in the same directory. More soon, Deepak. Also - if you are using V7...you dont need the -sgl switch. a simple: >> mcc -m yourfile would the trick. -Ash "Giovanni"...

Web resources about - Create Files/ Upload Files - comp.lang.tcl

iRobot Create - Wikipedia, the free encyclopedia
iRobot Create is a hobbyist robot manufactured by iRobot that is based on the Roomba platform and was introduced in 2007. However, iRobot Create ...

The Knot Creates Facebook Page To Help Hurricane Sandy Victims Salvage Their Weddings
The damage in the wake of Hurricane Sandy included some 2,300 weddings that had to be postponed or rescheduled, according to wedding portal The ...

How to create the perfect unisex kids bedroom
Thankfully, creating a bedroom all your kids will love equally doesn't have to be mission impossible.

Exclusive: Microsoft, developer partner to create $500 million ‘smart city’
Microsoft is partnering with techie-turned-real estate developer Minh Le to build a 2.5 million-square-foot, $500 million "smart city" in a suburb ...

How to Create More by Getting Better at it
“Don't be satisfied with stories, how things have gone with others. Unfold your own myth.” [Rumi] If everything has been said and done before, ...

Watch Obama's perfect response to Republicans who say he helped create Donald Trump's rise
At a joint press conference with Canadian Prime Minister Justin Trudeau, President Obama was asked whether he considers himself responsible for ...

David Chipperfield creates "palazzo atmosphere" for Valentino
... David Chipperfield for its flagship boutique in London Hard Venetian terrazzo and marble surfaces are paired with soft carpets to create the ...

Google+ Create program will highlight experts in their field
Google+ has launched a new program called "Create" that puts makers, artists, influencers and experts in their field in front of a bigger audience. ...

Walmart Creates Training Academies To Improve Customer Service
You can’t be great at everything. Very few companies are able to have the lowest prices and amazing customer service. You have to play to your ...

Musings Of An Average Joe: Clueless Mob Protests Trump, The Man They Helped Create And May Have Just ...
By Joe Bilello - Fox News Friday night, in a twist of irony, an angry mob of anti-free speech rabble rousers chanted “We stopped Trump,” seemingly ...

Resources last updated: 3/13/2016 2:10:44 PM