Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to export to txt and use "-sign

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default How to export to txt and use "-sign

You could enter it into the cell as a formula, like this:

=CHAR(34)&"file name.pdf"&CHAR(34)

and this will give you:

"file name.pdf"

Hope this helps.

Pete


On Aug 7, 2:18*pm, X-Ray wrote:
I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename * * | *filename.pdf * | * * *"file name.pdf"

Export to txt:

rename * * | *filename.pdf * | * * *""""file name.pdf""""


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default How to export to txt and use "-sign

Why dont you just open the .txt file in a notepad and do a find/replace

Find: """
Replace: "

If this post helps click Yes
---------------
Jacob Skaria


"X-Ray" wrote:

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to export to txt and use "-sign

You could use a helper column (column D??) that contained formulas like:

=a1&" """&b1&""" """&c1&""""

Then copy that column and paste into a notepad file. Then save that file as
something.bat



X-Ray wrote:

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to export to txt and use "-sign

Nice workaround, I completely didn't think of it. But not really desirable. I
prefer to not have any actions outside Excel, so I can further automate the
actions in Excel.

"Jacob Skaria" wrote:

Why dont you just open the .txt file in a notepad and do a find/replace

Find: """
Replace: "

If this post helps click Yes
---------------
Jacob Skaria


"X-Ray" wrote:

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to export to txt and use "-sign

When exporting to a text-file I still get extra undesired quotes.

"Pete_UK" wrote:

You could enter it into the cell as a formula, like this:

=CHAR(34)&"file name.pdf"&CHAR(34)

and this will give you:

"file name.pdf"

Hope this helps.

Pete


On Aug 7, 2:18 pm, X-Ray wrote:
I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to export to txt and use "-sign

Nice and simple workaround to copy the selection to notepad. But not really
desirable. I prefer to not have any actions outside Excel, so I can further
automate the actions in Excel.

And I already tested to make use of a helper column. But thanks anyway.


"Dave Peterson" wrote:

You could use a helper column (column D??) that contained formulas like:

=a1&" """&b1&""" """&c1&""""

Then copy that column and paste into a notepad file. Then save that file as
something.bat



X-Ray wrote:

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to export to txt and use "-sign (Sollution)

I have found a solution. When I save as "Space delimited (*.prn)" there are
no extra quotes added.

Thx everybody for your suggestions.

"X-Ray" wrote:

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default How to export to txt and use "-sign (Solution - additional info)

I forgot to mention that it is still necessary to enter the quotes yourself,
but there are no extra qoutes added.

"X-Ray" wrote:

I have found a solution. When I save as "Space delimited (*.prn)" there are
no extra quotes added.

Thx everybody for your suggestions.

"X-Ray" wrote:

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How to export to txt and use "-sign

If you really don't want any actions outside of excel, maybe you should have a
macro that runs against the data--avoiding the .bat file completely.

Excel's VBA has its own Name command (see VBA's help) to rename files.



X-Ray wrote:

Nice and simple workaround to copy the selection to notepad. But not really
desirable. I prefer to not have any actions outside Excel, so I can further
automate the actions in Excel.

And I already tested to make use of a helper column. But thanks anyway.

"Dave Peterson" wrote:

You could use a helper column (column D??) that contained formulas like:

=a1&" """&b1&""" """&c1&""""

Then copy that column and paste into a notepad file. Then save that file as
something.bat



X-Ray wrote:

I want to make a batch rename file. Therefore I put the commands and
parameters in columns in Excel and save this to a txt file.
But I run in to the following problem. When a filename contains a white
space I have to enclose the name between double quotes. But when I do this in
Excel and make an export extra quotes are added.
How do I add the double qoute sign the right way ?

Example (|-sign to indicate columns):

Excel:
rename | filename.pdf | "file name.pdf"

Export to txt:

rename | filename.pdf | """"file name.pdf""""


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to divide a number with "less than" sign? ie: <1/1000 = <0.001 justinbeau Excel Worksheet Functions 3 March 4th 09 09:50 AM
How do you make a "cents" sign on the keyboard? Susan at work Excel Discussion (Misc queries) 2 September 18th 08 06:29 PM
The letter "b" appears after the dollar sign Fellow Excel Discussion (Misc queries) 7 August 6th 08 09:38 PM
How to "sign" macro with "digital certificate"? Clueless in Seattle New Users to Excel 5 March 23rd 08 02:48 AM
How do display a "+" or "-" sign when hiding columns? DTI Tustin Setting up and Configuration of Excel 1 July 13th 06 01:21 PM


All times are GMT +1. The time now is 12:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"