f



Copying files while changing name and variable in file

I need to copy a file and change the name from 1 to 2, and 3, and so
on...
while doing this 5000 times I also need to sequentially replace 2
variables within the file also sequentially....is there an easy way to
do this?
I'm completely new to dos so any help would be a great help.

thanks in advance!!

0
5/3/2006 6:46:13 PM
comp.lang.basic.visual.misc 10153 articles. 0 followers. Post Follow

2 Replies
817 Views

Similar Articles

[PageSpeed] 44

"Midnight" <jessica_brooks@csx.com> wrote in message 
news:1146681973.453560.213800@j33g2000cwa.googlegroups.com...

> I need to copy a file and change the name from 1 to 2, and 3,
> and so on... while doing this 5000 times I also need to sequentially
> replace 2 variables within the file also sequentially....

What do you mean by "replace 2 variables within the file"? That could mean 
just about anything! You need to be *very explicit* and tell us *exactly* 
what this file contains and *exactly* how it is formatted and *exactly* 
which parts of it you want to change.

> I'm completely new to dos . . .

dos? What dos? Is that some kind of disk operating system?

Mike



0
mike5607 (1952)
5/3/2006 7:10:01 PM
set JOB_PATH=.\faxes
set JOB_NAME=fax1.job
set JOB_FOLDER=%JOB_PATH%\fax1

type sec1.txt > %JOB_PATH%\%JOB_NAME%
echo DIDNumber(*5000*9042452000*) >> %JOB_PATH%\%JOB_NAME%
type sec2.txt >> %JOB_PATH%\%JOB_NAME%
echo From_FaxNumber(*5000*9042452000*) >> %JOB_PATH%\%JOB_NAME%
type sec3.txt >> %JOB_PATH%\%JOB_NAME%

mkdir %JOB_FOLDER%
copy %JOB_PATH%\SinglePageFaxSeed %JOB_FOLDER%

This is what I was given...
the didnumber *5000 has to change...along with job name.  job name
needs to be test 1, test2, test3, and so on.  does this help any?
i'm sorry I have been so vague, I just really am trying to learn about
this and fast!
thanks again for the reply!

0
5/4/2006 12:42:48 PM
Reply:

Similar Artilces:

Extracting variables from multiple *.txt files and having the variable name dependent on the name of the *.txt file
I have about 30 *.txt files that have contain data in the same format. I'd like to extract a certain set of data from each of these files, and store them as their own variables, not in a matrix. Each file name is structured in the following way: name_20xx_yy.txt where xx reflects the 2-digit year and yy reflects the 2-digit month of each data set. I'd like to be able to create column vectors from the data set that reflect the different data sets that they come from, i.e. var_20xx_yy= name_20xx_yy(:,3) This way I will have 30 different var_xx_yy variables each reflect...

File, Find References, Copy Files: Truncating Long File Names
Hello All- I just experienced this behavior this morning. It was repeatable. Has anyone else seen this? The file Name was cut off after 57 characters. XP Pro SP2 2006 SP0 Office XP 2003 Pro Best Regards, Devon T. Sowell www.3-ddesignsolutions.com How long was the path name in total? Total including the file extension (.SLDASM) = 174. The file Extension was retained, just the Name was chopped off. These are my customer's files. Best Regards, Devon T. Sowell www.3-ddesignsolutions.com "TOP" <kellnerp@cbd.net> wrote in message news:1128364278.638472.150320@f14g2000...

Code: writing file with unicode content using unicode file name in visual basic
I'm posting this here so that other people that want to do the same thing do not have to do as much trial and error programming as I had to do. The following code is very simple, it constructs some string to use as content and file name. The string contains Unicode code points for some Cyrillic capital letters, just to test that Unicode works. Just out this code in a new Module in Visual Basic and run the project: Sub main() Dim sContent As String Dim fileName As String Dim oFSO As Object Dim oTextStream As Object ' Unicode code points, U+NNNN ...

Copy Files with long file names
Hi, I am using CopyFile (Scripting.FileSystemObject) to copy file from one location to another. The naming convention followed makes the file names (+ the path) lenghty and the total characters can exceed 260 characters. I would appreciate if you can let me know if there is any solution to bypass max limit (Filename + Path) of 260 characters. The copying of file from one location to another happens on the click of a button in MS Access Forms. Thanks in Advance. Regards Bala Access Version : Access 2003 The files (can be any type of files like .xls, .doc, .pdf etc..) i...

Copying File or Changing File Date
Hi, How do you change the file creation date of a file in windows using java. I tried the File.setLastModified() method and it is not doing what I hoped it would do which is to change the date time stamp displayed in windows explorer. I basically want to copy a file read via InputStream from a URL and written into a local file system using DataOutputStream. The problem is the file written using DataOutputStream is created ad hoc and creates a "new" file with the current datetime stamp. Is it possible to "copy" a file from a URL source or a server-side file system source ...

saving files using a variable file name
I would like to have a loop that saves a series of files of different names but it seems like I can't use a variable string as my file name when using save. For example: >> name = 'testname.mat' >> save name saves a file named <name.mat> when I'd like a file named <testname.mat>. Is there a way to do what I am looking for? Thanks. Kasey Kasey Horton wrote: > > > I would like to have a loop that saves a series of files of > different > names but it seems like I can't use a variable string as my file > name > when using save. ...

Copying files and changing their names
Hi all, I have a directory with numerous folders, each of which contains numerous folders and/or files. Each of the files in each of these folders has a number. I want to iterate through all these files, and, for every file that ends in a '[filename]-9', I want to COPY the file and rename it '[filename]-final'. Is there a simple way to do this in Ruby? Any help much appreciated! Sam -- Posted via http://www.ruby-forum.com/. Alle mercoled=C3=AC 14 marzo 2007, SamF ha scritto: > Hi all, > > I have a directory with numerous folders, each of which contains > num...

What setting I need to change in Visual Studio C++ v8 to run the same file that we have changed into .c after executing it as an .m file
??? ??? Jan ...

how can I save text files to the file name which defined by variable
hi I have a file named time_fina which is a array, and want save it to a text file , which located in the directory name 'e:\temp\' and the site_name is a variable defined above, '_mload.dat3' is the suffix name. for example my program is below, time_fina = [1 2 3 4 5 6]; save_name = strcat('e:\temp\',site_name,'_mload.dat3'); save save_name time_fina -ascii thanks . Dear mouse cat! > I have a file named time_fina which is a array, and want save it to a text file , which located in the directory name 'e:\temp\' and the site_name is a...

changing a variable name in multiple files
grettings all,, how can I change the name of a variable that exists in multiple .m files without opening each file? On 6/13/2013 4:31 AM, Mar wrote: > grettings all,, > > how can I change the name of a variable that exists in multiple .m files > without opening each file? Can't. Now, you could use a programming editor that has facility to look at more files or write a utility (not trivial for general case) but still even those will have to open the files. But, I presume the question is from the Matlab editor and afaict it doesn't have the facility to make changes across files even if their already open. -- dpb <none@non.net> wrote in message <kpcdkc$8o8$1@speranza.aioe.org>... > On 6/13/2013 4:31 AM, Mar wrote: > > grettings all,, > > > > how can I change the name of a variable that exists in multiple .m files > > without opening each file? > > Can't. Now, you could use a programming editor that has facility to > look at more files or write a utility (not trivial for general case) but > still even those will have to open the files. But, I presume the > question is from the Matlab editor and afaict it doesn't have the > facility to make changes across files even if their already open. > > -- Thank you for the help.. How do you think I can tell Matlab developers that a feature like this maybe useful in the coming releases?? &qu...

print jgp to file, set resolution, and have file name a variable
Ok I have what appears to be an easy problem. I need to capture a figure and save it as a jpg. This is very easy with: print -r0 -djpeg jpg_file_name BUT>>>> How can i use a variable for the file's name? Right now I can save this as "jpg_file_name.jpg" then make a scrpit that changes the file's path and name. There has to be an easier way. Why can't I just save the resolution, size, format, path and filename in one or two lines of code? "David Henner" <dhenner@psemi.com> wrote in message news:ef4a41b.-1@webcrossing.raydaftYaTP... > O...

changing file name in "Save as" option for html files
Hi , I am trying to dynamically change file name of an html that is generated through a cgi script, I know that for it is easy to do this for other type of files such as pdf or csv which we download and save , we can use "Content-Disposition: attachment; filename = "abc.pdf"" to change the file name. but this is not working in case of html , I tried to use "inline" with Content-Disposition, but this willl just display the html script AS-IS . I tried another alternative like "Content-type: text/html; name=dowload.html\n\n";, but that also fail...

parsing output into output files within a macro + variable naming of files
With the help of this forum I've arrived at this macro. It produces output= for each iteration into one excel file. I would like to have the output p= arsed into a file per run of the do command and to have each of these files= named for the value of the iterated variable on that run. Currently, only = one file is produced with all of the output and it is named #filename.=20 GET FILE=3D'/desktop/employee.sav'. GET FILE=3D'/desktop/employer.sav'. define !cbook=20 (splitvar =3D !TOKENS(1) /=20 start =3D !TOKENS(1) /=20 finish =3D !TOKENS(1))=20 !do !i =3D !start !to !finish=20 DATASET ACTIVATE DataSet1. temporary.=20 select if (!splitvar EQ !i).=20 CODEBOOK color [n] fruit [n] car [s]=20 /VARINFO LABEL TYPE VALUELABELS /OPTIONS VARORDER=3DVARLIST SORT=3DASCENDING MAXCATS=3D200 /STATISTICS COUNT. USE ALL. COMPUTE filter_$=3D(car=3D1). VARIABLE LABELS filter_$ 'car=3D1 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMATS filter_$ (f1.0). FILTER BY filter_$. EXECUTE. CODEBOOK car [s] tree [s] color [s] /VARINFO LABEL TYPE VALUELABELS /OPTIONS VARORDER=3DVARLIST SORT=3DASCENDING MAXCATS=3D200 /STATISTICS COUNT. USE ALL. DATASET ACTIVATE DataSet2. temporary.=20 select if (!splitvar EQ !i).=20 CODEBOOK color [n] fruit [n] car [s]=20 /VARINFO LABEL TYPE VALUELABELS /OPTIONS VARORDER=3DVARLIST SORT=3DASCENDING MAXCATS=3D200 ...

changing file name in "Save as" option for html files
Hi , I am trying to dynamically change file name of an html that is generated through a cgi script, I know that for it is easy to do this for other type of files such as pdf or csv which we download and save , we can use "Content-Disposition: attachment; filename = "abc.pdf"" to change the file name. but this is not working in case of html , I tried to use "inline" with Content-Disposition, but this willl just display the html script AS-IS . I tried another alternative like "Content-type: text/html; name=dowload.html\n\n";, but that also fail...

Creating a variable to change the name of an export file
I have a database that I periodically export to a text file for a Word mail merge. I have a query that finds all of the records with a null export date and a query that updates the export date to now(). I have a macro that runs the first query, uses TransferText to send it to a file, then runs the update query. However, the file name in TransferText is "hard wired" so whatever was there before gets written over. Is there a way to create within the macro an environmental variable for the file name based on date/time so that I can keep these export files? I would use VBA code...

Save (i)th variable from a structure to an individual text file with dynamic file name
I wrote this code data=repmat([1:1:5],5,1); test.input=[]; test.output =[]; for i=1:5 test.input(:,:,i)= data(:,:); test.output(:,:,i)=data(:,:).*i; name = ['lwp_',num2str(i),'.txt']; dt = test.output(:,:,i); save name dt; end clear i name dt; What I would like to get out of this is 5 text files named out1.txt, out2.txt, etcetera, with each one containing the (i)th output, that is test.output(:,:,1),test.output(:,:,2), etcetera What I get instead is a single name.mat file. COnversely, if I replace save name dt; with save (name, dt)...

automatic naming of files based on the readed file name?
Using "write labview measurement file" and "read labview measurement file". For example: Readed_file.dat Readed_file_written.dat I recommended u to try "Long Path Tool" program .before I have problem like this. and after I found long path tool and now my problem solved markian -- ...

Bash: strip file path and file extension from a file name in a $string?
It appears that Bash supports stripping a match of $substring from $string from the front and from the back of $string through the following commands: ${string#substring} ${string%substring} Yet, it doesn't appear that it is possible to simultaneously strip a couple of substrings from the front and from the back of a string, which is a bit of a problem if a user intends to strip the path and file extension from a file listing. Nonetheless, this is certainly possible. So, is it possible to strip both the path and the file extension from a file? If so, can anyone prov...

File IO/Copy A File
I am stumped on this one... Any easy way to copy a file from a button event in RB 5.2? I basically want the button to copy DB.rdb to DB.bak. THis way is someone hozes the file, we have a backup. Thanks in advance, SJ > I am stumped on this one... > > Any easy way to copy a file from a button event in RB 5.2? I > basically want the button to copy DB.rdb to DB.bak. THis way is > someone hozes the file, we have a backup. > > Thanks in advance, > > SJ Maybe I am missing what you are trying to do - but wouldn't FolderItem.CopyFileTo d...

File name from file description
Hi, I am new to this group. I had just one small question Is it possible to get the file name back from file descriptor. i.e. I have written a function to overload the libc write using LD_PRELOAD my_write(int fd, void *buf, size_t nbytes) In this function is it possible to find the filename from "fd". thanks amit poddar007@gmail.com writes: > Hi, > > I am new to this group. I had just one small question > > Is it possible to get the file name back from file descriptor. No. There is no such thing as "the filename". On some Unixes you can get a fil...

Copying a file to another file
Hi, I wrote the following C program to copy a file to another file. #include <stdio.h> #include <stdlib.h> static FILE *open_file ( char *file, char *mode ) { FILE *fp = fopen ( file, mode ); if ( fp == NULL ) { perror ( "Unable to open file" ); exit ( EXIT_FAILURE ); } return fp; } int main ( int argc, char *argv[] ) { /* int ch;*/ FILE *from; FILE *to; char *buffer; long lSize; if ( argc != 3 ) { fprintf ( stderr, "Usage: %s <readfile1> <writefile2>\n", argv[0] ); exit (1);/* E...

File name from file description
Hi, I am new to this group. I had just one small question Is it possible to get the file name back from file descriptor. i.e. I have written a function to overload the libc write using LD_PRELOAD my_write(int fd, void *buf, size_t nbytes) In this function is it possible to find the filename from "fd". thanks amit On 28 Mar 2006 11:45:02 -0800, in comp.lang.c , "poddar" <poddar007@gmail.com> wrote: >Hi, > >I am new to this group. I had just one small question > >Is it possible to get the file name back from file descriptor. C doesn't have ...

excel file name as variable name?
Hi, I'm very new to MATLAB. I have several Excel files whose names contain dates (mm.dd.yy). Each file contains 28 columns of data which need to be assigned to 28 unique variables. My problem is... I would like to use the digits in each Excel file name as part of the names of each variable. For example, if one Excel filename is "9.6.06 RW.xls" I would like to create variables (1440x1) named: L19606 L29606 .. .. .. L289606 I have written a routine that gives me just the digits (9606, in this case), but I'm having trouble figuring out how to automate the creation of v...

FAQ 5.2: How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file?
This message is one of several periodic postings to comp.lang.perl.misc intended to make it easier for perl programmers to find answers to common questions. The core of this message represents an excerpt from the documentation provided with Perl. -------------------------------------------------------------------- 5.2: How do I change one line in a file/delete a line in a file/insert a line in the middle of a file/append to the beginning of a file? Use the Tie::File module, which is included in the standard distribution since Perl 5.8.0. ------------------------------------------...

Web resources about - Copying files while changing name and variable in file - comp.lang.basic.visual.misc

The Changing Light at Sandover - Wikipedia, the free encyclopedia
"The Changing Light at Sandover" is a 560-page epic poem by James Merrill (1926–1995). Sometimes described as a postmodern apocalyptic epic, ...

Is Facebook Changing How We Travel?
When one of your Facebook friends posts a photo album of their trip to Maui, they’re not just showing off — they might also be acting as a travel ...

Missed this week's Changing Track?... - 774 ABC Melbourne - Facebook
Missed this week's Changing Track? We've got you covered. Like to submit your own? Email it to 774drive@abc.net.au

Facebook changing PMD program to Facebook Marketing Partners
Facebook’s Preferred Marketing Developer program may be getting a new look. Earlier today, Facebook announced on the Facebook for Business page ...

Changing Lanes (@chginglanes) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Changing the way business decisions are made
We believe that social data has unlimited value, and near limitless application. Today, we’re taking an important step toward unleashing this ...

12 Minutes To Create a Mind-Changing Presentation
... draft great presentations and to become a more effective and convincing presenter. Twelve minutes which can 12 Minutes To Create a Mind-Changing ...

We're Changing Our Name (Back) to Stack Overflow
We are Stack Overflow. You may know us from such popular websites as Stack Overflow Q&A, Stack Overflow Careers, The Stack Exchange Q&A Network, ...

The Tao of Twitter: Changing your life and business 140 characters at a time - Amazon
It's time to take the mystery out of Twitter. Twitter may be the most powerful business and personal networking platform ever created but it ...

App Store - Voices 2 ~ fun voice changing!
Read reviews, get customer ratings, see screenshots, and learn more about Voices 2 ~ fun voice changing! on the App Store. Download Voices 2 ...

Resources last updated: 3/19/2016 2:27:31 PM