How To Concatenate a String/Character
Posted: 20 Nov 2018 08:19
we have a multiple scripts (*.sql) that is spread out of multiple subfolders. i need to get all of those scripts in one script including the subfolder paths. i use this command:
this works fine it will list all the files including the subfolder path and puts it in one file warren.sql.
for example:
but i need to add a semicolon ";" character at the end of the file name
for example
how do i concatenate a string/character using a dir command? thank you
Code: Select all
dir *.* /s /b /a-d > warren.sql
for example:
Code: Select all
z:\warren>
11/19/2018 03:38 PM <DIR> .
11/19/2018 03:38 PM <DIR> ..
11/19/2018 11:25 AM <DIR> APPS
z:\warren\APPS>
z:\warren\APPS>dir
Volume in drive z is HOME
Volume Serial Number is 2736-G3SD
Directory of O:\warren\APPS
11/19/2018 11:25 AM <DIR> .
11/20/2018 08:45 AM <DIR> ..
11/19/2018 11:25 AM <DIR> 001TABLES
11/19/2018 11:25 AM <DIR> 002VIEWS
11/19/2018 11:25 AM <DIR> 003TRIGGERS
11/19/2018 11:25 AM <DIR> 004PROCEDURES
0 File(s) 0 bytes
3 Dir(s) 5,346,648,166,400 bytes free
z:\warren\APPS>cd 001TABLE
z:\warren\APPS\001TABLE> dir/od
Volume in drive z is HOME
Volume Serial Number is 2736-G3SD
Directory of z:\warren\APPS\001TABLES>
11/14/2018 02:39 PM 2,650 TAB001.sql
11/14/2018 02:39 PM 771 TAB002.sql
11/14/2018 02:39 PM 566 TAB003.sql
9 File(s) 3,987 bytes
2 Dir(s) 5,346,616,463,360 bytes free
z:\warren\APPS\001TABLE>cd \warren
z:\warren>dir *.* /s /b /a-d > warren.sql
z:\warren>type warren.txt
z:\warren\APPS\001TABLES\TAB001.sql
z:\warren\APPS\001TABLES\TAB002.sql
z:\warren\APPS\001TABLES\TAB003.sql
for example
Code: Select all
z:\warren\APPS\001TABLES\TAB001.sql;
z:\warren\APPS\001TABLES\TAB002.sql;
z:\warren\APPS\001TABLES\TAB003.sql;