How to concatenate strings with the lines of a text file

Hello
I tried concatenate strings with the lines of a text file, but something is wrong with my code and I belive is the agruments I use in the cycle for. If anyone can help me I will appreciate it very much.
My code is:
[code]@echo off
the value "input=C:\Users\123\Desktop\List.txt".
for /f "usebackq tokens = *" % in (' input % ') do)
the value 'str1 = C:\some directory\ ".
the value ' str2 = %% ~ F '.
the value "str3 = .pdf".
the value "str4 = str1% str2% str3%.
echo.%STR4%
) [/ code]
and the text file is something like:
121122 [code]
122233
123344
124455 [/ code]
But I get only one wrong answer and I have to run it like 3 times to get a real result and it is a mistake, the first two are empty spaces and gives the third one as the last line of the text file but repeated n times, where n is the number of lines in the text file.
Result:
[code] C:\Users\123\Desktop>concatenate.bat
C:\Users\123\Desktop>concatenate.bat
C:\Users\123\Desktop>concatenate.bat
C:\some directory\124455.pdf
C:\some directory\124455.pdf
C:\some directory\124455.pdf
C:\some directory\124455.pdf
C:\some directory\124455.pdf
C:\Users\123\Desktop>[/code]
So if anyone has an idea about what is wrong please let me know.
Concerning
-Victor-

Hi Victor,

This forum is dedicated to the support of the Office of consumer Windows (fonts, colors, personal settings).  Since your question is about programming and usually outside the context of most of the customers, I suggest you post your question in the forums as http://msdn.microsoft.com - the Microsoft network to users will be more adapted to help you in your quest.

Tags: Windows

Similar Questions

  • problem with the backup data in text file

    Hello

    The problem I am facing wihile, saving the data in the text file is that everytime when I'm slecting the path of the façade, data that are recorded are added with the previous data, not only in the new text, the new data set is saved but also, is there any previuos run for the program , the corresponding data is also present in this text file.

    However, when I change the same ''(file path) to 'constant' in the control block diagram, and then add the path of the file, it doesn't have this problem. Basically, changing the "file path" constant in the diagram of control block (so that it is displayed in the front panel) is at the origin of the problem.

    Help, please!

    Thank you

    Your shift on the loop Register For is not initialized. It will keep the value of the string since the last time that he performed. That initialize and it should solve your problem.

  • Use the lines of a text file as input to an SQL command

    Hello

    I have a text file containing the lines...

    123

    1234

    I would like to use as input for a SQL command running in a script. ie

    Update flag set < table > = 'Y' where job = < the text file lines >;

    Any help much appreciated.

    See you soon

    External table will do.

    For reference...

    CREATE TABLE Hold'em (SEQ_NUM NUMBER (10));

    insertion in hold select SEQ_NUM in task where proc like '% PROC;

    update set hold_flag = task ' ' where in SEQ_NUM (select hold SEQ_NUM);

  • How to draw a line (with the line segment tool) then draw another line, from those previous anchor point. When I try immediately draw another line on the other anchor lines it try to turn instead.

    I'm following a course of basic fundamental illustrator on Lynda. The video of "draw straight lines" is troubling me. They draw a line with the line segment and then draw another line coming out the anchor point at an angle.

    Here's where it is troubling me - when I try to drag a line to the anchor point trying to transform the first line, I drew. (the line cursor turns into a selection tool) I can't draw another line connecting the first.

    Advice would be great because it's driving crazy me.

    See you soon,.
    Kyle

    Yes, it is irritating. You must clear the previous line first. If you want to make sure that both ends are perfectly aligned, start by turning on the guides. If you want two lines to be part of the same way, you should use the tool pen instead.

  • In Adobe Flash CS6, I have a blue box appearing around lines drawn with the line tool (and other tools like the brush etc.). I can't understand how to disable.

    In Adobe Flash CS6, I have a blue box appearing around lines drawn with the line tool (and other tools like the brush etc.). Whenever I try to use a tool, a blue box appears around the line and I have to double click on it to handle, which opens just this line in a screen finery semi where all other objects are semi-gris in the background. I can handle this line in this screen, but nothing else at this point I could do 5 minutes ago. For example, I can no longer reach the 2 lines drawn by the tool online together. For some reason, it started randomly (probably due to an accidental combination) and I just can't put it to what it was. I inserted a video showing if all goes well I mean. Any help would be appreciated.

    Object drawing mode. Simply disable it in the tools Panel, or by using the default keyboard shortcut, which is J.

  • How reslove an error with the dbms_redefinition.start_redef_table command?

    Command:

    BEGIN

    () DBMS_REDEFINITION.start_redef_table

    uname = > "kiku"

    orig_table = > 'pletest3_pn_kiku_api_db ',.

    int_table = > 'pletest4_pn_kiku_api_db');

    END;

    Error:

    Error report:

    ORA-12008: error path refresh materialized view

    ORA-14400: inserted partition key is not mapped with any partition

    ORA-06512: at "SYS." DBMS_REDEFINITION", line 50

    ORA-06512: at "SYS." DBMS_REDEFINITION", line 1343

    ORA-06512: at line 2

    12008 00000 - "error in the path of refresh materialized view.

    * Cause: Table SNAP$ _ < mview_name > reads lines of sight

    MVIEW$ _ < mview_name >, which is a view of the main table

    (the master can be on a remote site).  Any

    error in this way will cause this error when updating.

    For updates of the Rapids, the table < master_owner >. MLOG$ _ < master >

    is also referenced.

    * Action: Examine the other messages on the stack to find the problem.

    See if SNAP objects $ _ < mview_name >, MVIEW$ _ < mview_name >.

    < mowner >. < master > @ < dblink >, < mowner >. MLOG$ _ < master > @ < dblink >

    There is always.

    How reslove an error with the dbms_redefinition.start_redef_table command?

    As I said before, this may be reproduced if the intermediate table is not created correctly.

    SQL> --My database version.
    SQL> ----------------------
    SQL> SELECT * FROM v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE TABLE not_partitioned_tbl AS
      2*  SELECT object_id,object_name,created,owner FROM all_objects
    SQL> /
    
    Table created.
    
    SQL> ALTER TABLE not_partitioned_tbl ADD CONSTRAINT not_partitioned_tbl_pk PRIMARY KEY (object_id);
    
    Table altered.
    
    SQL> CREATE INDEX npt_created ON not_partitioned_tbl(created);
    
    Index created.
    
    SQL> EXECUTE DBMS_STATS.gather_table_stats('SCOTT','NOT_PARTITIONED_TBL',cascade=>true);
    
    PL/SQL procedure successfully completed.
    

    Now, I create the staging table without MAXPARTITION, so not all "created" dates cannot be mapped.

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE TABLE partitioned_tbl (object_id NUMBER, object_name VARCHAR2(30), created DATE, owner VARCHAR2(30))
      2      PARTITION BY RANGE (created)
      3      (PARTITION pt_2005 VALUES LESS THAN (to_date('01/01/2006','dd/mm/rrrr')),
      4       PARTITION pt_2006 VALUES LESS THAN (to_date('01/01/2007','dd/mm/rrrr')),
      5       PARTITION pt_2007 VALUES LESS THAN (to_date('01/01/2008','dd/mm/rrrr'))
      6      --PARTITION pt_rest VALUES LESS THAN (MAXVALUE) -- Maxpartition  is commented out intentionally.
      7*     )
    SQL> /
    
    Table created.
    
    SQL> EXEC DBMS_REDEFINITION.can_redef_table('SCOTT','NOT_PARTITIONED_TBL');
    
    PL/SQL procedure successfully completed.
    
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> ed
    Wrote file afiedt.buf
    
      1  BEGIN
      2     DBMS_REDEFINITION.start_redef_table('SCOTT','NOT_PARTITIONED_TBL','PARTITIONED_TBL');
      3* END;
    SQL> /
    BEGIN
    *
    ERROR at line 1:
    ORA-12008: error in materialized view refresh path
    ORA-14400: inserted partition key does not map to any partition
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
    ORA-06512: at line 2
    
    SQL>
    
  • How do you communicate with the Apple Watch

    How do you communicate with the Apple Watch

    Hello!

    Welcome to the Apple community. I'm not quite sure what you mean when you say "communicate" with the Apple Watch, so I'll give you a few options that can respond to your request.

    (1) the Apple Watch supports Siri, just like the iPhone and the Mac. To apply, simply say "Hey Siri" while the wrist is triggered, and your watch will respond. Alternatively, you can hold the digital Crown and Siri will be activated. As soon as Siri is activated, you can ask him questions such as "what is the weather today" or "reminder", or "Let's start a workout."

    (2) you can manually send SMS via your Apple Watch by use of Siri, or opening the messaging app. That Siri send your messages, just say 'Hey Siri, send a text < name >' and Siri will open the Messages app and wait to talk to you about your message. If you want to move the Messages app manually, press the digital Crown and will take you to the home screen. In the home screen, select the Messages app (a green icon with a word inside bubble). Any existing message log must appear, and you can type on a given message log and choose to respond.

    (3) If you want to place a phone call using your Apple Watch, you can say "Hey Siri, call < contact name >". If you have several numbers for a particular contact, Siri will ask you what number you want to call. You can also you can present a more specific request like 'Hey Siri, call < contact name >, < number >' with the number favorite is 'work' or 'House' or 'mobile' etc. So the demand go something like "Hey Siri, call Barbra, House".

    If you are still at a loss, with regard to the types of orders that Siri will accept, you can always ask. Say 'Hey Siri, what can you do?' and she will give you a list of commands that she will answer to the.

    If all goes well, I addressed your question. If not, please provide a little more information and I'll do what I can to help you.

    Good luck!

  • Does anyone know how to display along with the app on the Mac App Store in the Sierra of MacOS?

    Does anyone know how to display along with the app on the Mac App Store in the Sierra of MacOS?

    I've just updated to Sierra. Since the upgrade did several reboots. When I discover an app the side also shows "4 +" or similar and I click on the note to view reviews and ratings of customer, a blank screen appears. Everyone knows this or have a way to solve this problem?

    I see even here in Seattle, so I think the question is about the end of Apple.

    By the end of 2012 Mac minis, macOS?  Watch 38 mm silver AL, watchOS 3; iPad 2 Air & iPhone 6 + iOS 10.0.1;  Apple Airport Express

  • I can't create a shortcut to the site on my desktop, when I click on the url bar I can drag on the browser to open a new, but as I drag him on my desktop I get the circle with the line through it, one that looks like a no entry sign. Help?

    I can't create a shortcut to the site on my desktop, when I click on the url bar I can drag on the browser to open a new, but as I drag him on my desktop I get the circle with the line through it, one that looks like a no entry sign. Help

    Try to drag the image to id web site (favicon) on the left side of the address bar, instead of the URL.

  • Please help me understand how to install updates with the following error updated Message__The following have not been installed: __Security update for Microsoft XP KB 2289162

    Please help me understand how to install updates with the following error Message

    The following updates were not installed:

    Security for Microsoft XP KB 2289162 update

    See the section "How to get help" of http://support.microsoft.com/kb/2289162

    For individuals, please visit the Microsoft Solution Center and antivirus security for resources and tools to keep your PC safe and healthy.  If you have problems with the installation of the update itself, visit the Microsoft Update Support for resources and tools to keep your PC updated with the latest updates.

    Buying to meet problems installing Microsoft security updates also can visit the following page for assistance: https://consumersecuritysupport.microsoft.com/

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • view next to the documents... How to do that with the new CD?

    With the recent upgrade, I can view documents side by side... How to do that with the new CD? Thank you!

    Hi gregl36778306,

    You can open PDF files in different tabs and see them next.

    To do this, go in "Edit > Preferences > general" and check "open documents as new tabs.." option.

    Kind regards

    Ana Maria

  • How many computers works with the creative cloud for teams?

    How many computers works with the creative cloud for teams?

    Please see the business FAQ: Help & Support Enterprise

    Guinot

  • How to install lightroom with the help of my redemption code

    How to install lightroom with the help of a redemption code?

    Hello

    You can not install lightroom with a redemption code.

    You must use a serial number to install it.

    For the serial number, click on the below mentioned link

    https://redeem.licenses.Adobe.com/getserial

    Enter the code of redemption on the link above and you will get the serial number.

    Thank you and best regards,

    Garima SALAUN

  • When you try to activate creative cloud, I get "this code has already been used. How can I proceed with the download and installation?

    When you try to activate creative cloud, I get "this code has already been used. How can I proceed with the download and installation?

    Thanks for the Email, the problem is solved now. Please do not hesitate to contact in the future.

    Concerning

    Baudier

  • How to use photoshop with the same account on more than one laptop?

    How to use photoshop with the same account on more than one laptop?

    a single user license entitles you to two facilities simultaneous/activations.  so, what's the problem?

Maybe you are looking for