• How do you remove ampersand from a Win10 batch file user input creating

    From Oliver@21:1/5 to All on Fri Nov 15 22:42:02 2024
    XPost: alt.msdos.batch, rec.photo.digital

    How do you remove the ampersand from the batch file user input?

    Nothing is typed for the input to this batch script I hacked out.
    Everything is copied & pasted from the Amazon listing for the item.
    Working Example: <https://amazon.com/dp/B09X12TBC2>
    ASIN: B09X12TBC2
    BRAND: Microsoft
    ITEM: Windows installer
    DESCRIPTION: Windows 11 Home 64bit Retail USB
    BULLETS: Brand Microsoft Model Name KW9-00633 Screen Size 13.3 Inches Operating System Windows 11 Home Special Feature Lightweight Graphics Card Description Integrated Graphics Coprocessor ARM Mali-T604 Resolution 1080p Connectivity Technology USB
    Processor Count 1

    But if a special character such as an ampersand is present, it fails. Otherwise, it works.

    Everything is pulled off the Amazon description which sometimes has
    special characters which Windows barfs on in that Amazon description.

    Below is the script I hacked out to create consistent Amazon directories of stuff I've ordered (as Vine requires you to order at least 80 items) & then
    I use those folders to write consistent reviews (to remain in the program).

    The batch output fails if there is an ampersand (or special character) in
    the input. But the batch file works if no ampersand is copied & pasted.

    If I could figure out how to convert an inputted cut-&-paste that contains
    an ampersand to an "and" then I could likely figure out how to do it for
    the rest of the special characters that make MSDOS fail in batch input.

    Therefore my question asked of you is how to swap an ampersand to an "and"?

    I can't yet get these suggestions to work on the INPUT with an ampersand. https://stackoverflow.com/questions/14107975/escape-ampersands-in-variables-win-batch

    Instead of using the Microsoft real world example, these test inputs work.
    ASIN: myasin
    BRAND: mybrand
    ITEM: my item
    DESCRIPTION: my description
    BULLETS: my bullet1 my bullet2

    But any test input containing an ampersand fails (with random results).
    ASIN: myasin
    BRAND: my brand
    ITEM: my & item
    DESCRIPTION: my & description
    BULLETS: my bullet1 & my bullet2

    How can I convert the ampersand to the word "and" in the batch output?

    =====< cut for the createVineFolders.bat file >======
    @echo off
    REM When I order the required 3 items a day, I enter them into this script.
    REM Nothing is typed - everything is cut/pasted from an Amazon listing.
    REM It creates the directories & template photo files for you.
    REM That way the naming is consistent as you'll have thousands of these.
    REM WIP It barfs on the ampersand as a pasted input (need to fix that).
    REM An Amazon review title can be up to 100 characters only.
    REM The ASIN is unique to each item you order Amazon.
    REM The BRAND should be mentioned in the review because you work for them.
    REM The ITEM is a colloquial name you use to describe the product.
    REM The DESCRIPTION is an exact cut/paste of the Amazon item description.
    REM The BULLETS are all the bullets on a single line (requires pre-processing)
    REM The image file names are placeholders for eventual review images/videos.

    REM The resulting date format is YYYYMMDD to keep sorts similar to Vine output.
    set today=%DATE:~10,4%%DATE:~7,2%%DATE:~4,2%

    @echo off
    :BEGIN

    REM Obviously you replace the 100 characters below with your review title.
    set title=123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567890
    set /p asin="ASIN: "
    set /p brand="BRAND: "
    set /p item="ITEM: "
    set /p description="DESCRIPTION: "
    set /p bullets="BULLETS: "

    set dirname="%today% %brand% %item% %asin%"
    set name="%brand% %item% %asin%"

    mkdir %dirname%\%pic%
    cd %dirname%

    echo.%title% > %name%.txt
    echo."%cd%\" >> %name%.txt
    echo.ASIN=%asin% >> %name%.txt
    echo.BRAND=%brand% >> %name%.txt
    echo.ITEM=%item% >> %name%.txt
    echo.DESCRIPTION=%description% >> %name%.txt
    echo.BULLETS=%bullets% >> %name%.txt

    REM cam/vid is for original camera images/photos (prior to processing).
    REM pic is for images AFTER processing but not named consistently yet.
    REM pic/jnk is for images/video AFTER processing & no longer needed.
    REM pic/cap is for images/video AFTER processing & after adding captions.
    REM wip is for any file that is useful to the review other than those above.

    mkdir cam
    mkdir cam\vid
    mkdir pic
    mkdir .\pic\jnk
    mkdir .\pic\cap
    mkdir wip
    cd pic

    REM This is an imagemagic command to create dummy JPEG files.
    REM The point is to save edited results to consistent file names.
    REM This eliminates complex typing which begets mistakes.
    REM Plus it's easier to save over a file than to create the file name.
    convert -size 800x800 canvas: %name%_1a.jpg
    convert -size 800x800 canvas: %name%_2a.jpg
    convert -size 800x800 canvas: %name%_3a.jpg

    cd ..\..

    set /p repeat=Do you want to make another Amazon vine-review directory?[y/n]:
    if %repeat%== y goto BEGIN
    if not %repeat%== y goto END

    END:
    exit /B 0
    =====< cut for the createVineFolders.bat file >======

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From R.Wieser@21:1/5 to All on Sat Nov 16 08:20:27 2024
    XPost: alt.msdos.batch, rec.photo.digital

    Oliver,

    Two things:

    1) You might want to re-ask this in alt.msdos.batch.nt

    2) Use pretty-much /any other/ scripting language, as Batch downright sucks
    at string handling. Hard.

    But if you want to try anyway, this : https://stackoverflow.com/questions/15441422/replace-character-of-string-in-batch-script
    is what DDG turned up as its first result.

    Regards,
    Rudy Wieser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to Oliver on Sat Nov 16 19:10:21 2024
    XPost: alt.msdos.batch, rec.photo.digital

    On Fri, 15 Nov 2024 22:42:02 -0700, Oliver wrote:
    How do you remove the ampersand from the batch file user input?

    ...

    How can I convert the ampersand to the word "and" in the batch output?

    When prompting for a line input, instead of doing it like below...

    set /p item="ITEM: "

    Be accustomed of doing it like below instead.

    set /p "item=ITEM: "

    And when setting a variable, instead of doing it like below...

    set dirname="%today% %brand% %item% %asin%"

    Do it like below instead.

    set "dirname=%today% %brand% %item% %asin%"

    To replace all "&" characters with "and", do it like below - after the
    variable has been populated.

    set "item=%item:&=and%"

    Type `set /?` to see the SET command help.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Oliver@21:1/5 to All on Sat Nov 16 08:52:26 2024
    XPost: alt.msdos.batch, rec.photo.digital

    To clarify my quetion...

    I don't ask you to do my debugging, but I would like to know if I
    faithfully followed the suggestions, so here's the file after I followed
    what I thought were the suggestions (with the comments removed).

    Only one top-level directory is supposed to be created (which was how the original posted script worked - which was a fully working script).

    Did I follow your suggestions correctly or did I mess up in understanding?

    @echo off
    set today=%DATE:~10,4%%DATE:~7,2%%DATE:~4,2%

    :BEGIN
    set title=123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567890
    set /p "asin=ASIN: "
    set /p "brand=BRAND: "
    set /p "item=ITEM: "
    set "item=%item:&=and%"
    set /p "description=DESCRIPTION: "
    set "description=%description:&=and%"
    set /p "bullets=BULLETS: "
    set "bullets=%bullets:&=and%"

    set "dirname=%today% %brand% %item% %asin%"
    set "name=%brand% %item% %asin%"

    mkdir %dirname%\%pic%
    cd %dirname%

    echo.%title% > %name%.txt
    echo."%cd%\" >> %name%.txt
    echo.ASIN=%asin% >> %name%.txt
    echo.BRAND=%brand% >> %name%.txt
    echo.ITEM=%item% >> %name%.txt
    echo.DESCRIPTION=%description% >> %name%.txt
    echo.BULLETS=%bullets% >> %name%.txt

    mkdir cam
    mkdir cam\vid
    mkdir pic
    mkdir .\pic\jnk
    mkdir .\pic\cap
    mkdir wip
    cd pic

    convert -size 800x800 canvas: %name%_1a.jpg
    convert -size 800x800 canvas: %name%_2a.jpg
    convert -size 800x800 canvas: %name%_3a.jpg

    cd ..\..

    set /p repeat=Do you want to make another Amazon vine-review directory?[y/n]:
    if %repeat%== y goto BEGIN
    if not %repeat%== y goto END

    END:
    exit /B 0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Oliver@21:1/5 to jj4public@outlook.com on Sat Nov 16 08:46:49 2024
    XPost: alt.msdos.batch, rec.photo.digital

    On Sat, 16 Nov 2024 19:10:21 +0700, JJ <jj4public@outlook.com> wrote

    On Fri, 15 Nov 2024 22:42:02 -0700, Oliver wrote:
    How do you remove the ampersand from the batch file user input?

    ...

    How can I convert the ampersand to the word "and" in the batch output?

    When prompting for a line input, instead of doing it like below...

    set /p item="ITEM: "

    Be accustomed of doing it like below instead.

    set /p "item=ITEM: "

    And when setting a variable, instead of doing it like below...

    set dirname="%today% %brand% %item% %asin%"

    Do it like below instead.

    set "dirname=%today% %brand% %item% %asin%"

    To replace all "&" characters with "and", do it like below - after the variable has been populated.

    set "item=%item:&=and%"

    Type `set /?` to see the SET command help.

    Thanks for that advice, where it didn't work (it's supposed to create a
    single toplevel directory - not a bunch of them at the top level).

    But maybe I misunderstood "where" I should up the ampersand swap?
    Is this what you were suggesting?
    set /p "asin=ASIN: "
    set /p "brand=BRAND: "
    set /p "item=ITEM: "
    set "item=%item:&=and%"
    set /p "description=DESCRIPTION: "
    set "description=%description:&=and%"
    set /p "bullets=BULLETS: "
    set "bullets=%bullets:&=and%"

    If so, that doesn't work - it creates directories that I can't even delete. (It's odd that there are directories I can't delete - even as an admin.)

    I'm confused where I'm supposed to put the ampersand swap lines.
    Can you clarify if that's the right location just after population?

    I'll debug. But can you confirm where in the original batch script
    you're expecting me to insert the three ampersand-swap commands?

    Thanks. Here's my output currently (some directories cannot be deleted!).

    ASIN: my asin
    BRAND: my branding
    ITEM: my items
    DESCRIPTION: my desc
    BULLETS: my bullets
    A subdirectory or file 20241611 already exists.
    Error occurred while processing: 20241611.
    A subdirectory or file my already exists.
    Error occurred while processing: my.
    A subdirectory or file my already exists.
    Error occurred while processing: my.
    A subdirectory or file my already exists.
    Error occurred while processing: my.
    A subdirectory or file asin\ already exists.
    Error occurred while processing: asin\.
    The system cannot find the path specified.
    Access is denied.
    Access is denied.
    Access is denied.
    Access is denied.
    Access is denied.
    Access is denied.
    Access is denied.
    A subdirectory or file cam already exists.
    A subdirectory or file cam\vid already exists.
    A subdirectory or file pic already exists.
    A subdirectory or file .\pic\jnk already exists.
    A subdirectory or file .\pic\cap already exists.
    A subdirectory or file wip already exists.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'branding': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: unable to open image 'items': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    convert: unable to open image 'my': No such file or directory @ error/blob.c/OpenBlob/3573.
    convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746.
    Do you want to make another Amazon vine-review directory?[y/n]:

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JJ@21:1/5 to Oliver on Sun Nov 17 09:02:20 2024
    XPost: alt.msdos.batch, rec.photo.digital

    On Sat, 16 Nov 2024 08:52:26 -0700, Oliver wrote:
    To clarify my quetion...

    I don't ask you to do my debugging, but I would like to know if I
    faithfully followed the suggestions, so here's the file after I followed
    what I thought were the suggestions (with the comments removed).

    Only one top-level directory is supposed to be created (which was how the original posted script worked - which was a fully working script).

    Did I follow your suggestions correctly or did I mess up in understanding?

    You have a different problem.

    A file system path should be double-quoted, in case the path has a space or
    a special character in it. Otherwise, the command will see multiple
    parameters instead of one.

    e.g. a command line like this...

    mkdir z:\my data\new category

    That will never work as expected, since instead of 1 parameter, the command will see 3 parameters:
    1: z:\my
    2: data\new
    3: category

    So, the path should be double-quoted like this.

    mkdir "z:\my data\new category"

    If variables are used as part of a file system path, after the variables are expanded, it should end up double-quoted like above.

    A path whose parts are separated double-quoted like below...

    mkdir "z:\my data"\"new category"

    That also work, but highly not recommended, since not all programs do proper command line parsing. i.e. don't assume it will work for all programs.

    Also... Below command line is not same as above.

    mkdir "z:\my data"\ "new category"

    Notice the space between the 2 double-quoted parts. That would have the same problem as the first code above.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Oliver@21:1/5 to jj4public@outlook.com on Sat Nov 16 21:04:20 2024
    XPost: alt.msdos.batch, rec.photo.digital

    On Sun, 17 Nov 2024 09:02:20 +0700, JJ <jj4public@outlook.com> wrote

    Did I follow your suggestions correctly or did I mess up in understanding?

    You have a different problem.

    Well, I give up then. I'll just go back to the previous version which works
    as long as I remember not to feed it any of the special batch characters.

    When I figure out how to sed out the ampersand in a variable's definition
    to replace with "and", I'll write back. Until then I'll use the previous version which worked fine except when an ampersand was encountered.

    Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zaidy036@21:1/5 to Oliver on Sun Nov 17 16:23:07 2024
    XPost: alt.msdos.batch, rec.photo.digital

    On 11/16/2024 11:04 PM, Oliver wrote:
    On Sun, 17 Nov 2024 09:02:20 +0700, JJ <jj4public@outlook.com> wrote
    Did I follow your suggestions correctly or did I mess up in
    understanding?

    You have a different problem.

    Well, I give up then. I'll just go back to the previous version which works as long as I remember not to feed it any of the special batch characters.

    When I figure out how to sed out the ampersand in a variable's definition
    to replace with "and", I'll write back. Until then I'll use the previous version which worked fine except when an ampersand was encountered.

    Thanks.
    Google finds: https://stackoverflow.com/questions/15995263/how-to-remove-special-characters-from-string-using-batch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Oliver@21:1/5 to Zaidy036@air.isp.spam on Sun Nov 17 17:30:05 2024
    XPost: alt.msdos.batch, rec.photo.digital

    On Sun, 17 Nov 2024 16:23:07 -0500, Zaidy036 <Zaidy036@air.isp.spam> wrote

    When I figure out how to sed out the ampersand in a variable's definition
    to replace with "and", I'll write back. Until then I'll use the previous
    version which worked fine except when an ampersand was encountered.

    Thanks.
    Google finds: https://stackoverflow.com/questions/15995263/how-to-remove-special-characters-from-string-using-batch

    Thanks. I can find lots of "similar" questions but all of them require a
    *lot* of testing and changing since none are even close yet (although
    almost any hit "sounds" close - it's not close when you test it out).'

    But I do appreciate that you found that for me, which I duly inserted into
    the code, which doesn't kill the code - but it also doesn't do the job.

    @echo off
    setlocal EnableDelayedExpansion
    REM When I order the required 3 items a day, I enter them into this script.
    REM Nothing is typed - everything is cut/pasted from an Amazon listing.
    REM It creates the directories & template photo files for you.
    REM That way the naming is consistent as you'll have thousands of these.
    REM WIP It barfs on the ampersand as a pasted input (need to fix that).
    REM An Amazon review title can be up to 100 characters only.
    REM The ASIN is unique to each item you order on Amazon.
    REM The BRAND should be mentioned in the review because you shill for them.
    REM The ITEM is a colloquial name you use to describe the product.
    REM The DESCRIPTION is an exact cut/paste of the Amazon item description.
    REM The BULLETS are all the bullets on a single line (requires pre-processing)
    REM The image file names are placeholders for eventual review images/videos.

    REM The resulting date format is YYYYMMDD to keep sorts similar to Vine output.
    set today=%DATE:~10,4%%DATE:~7,2%%DATE:~4,2%

    :BEGIN

    REM Later you replace the 100 characters below with your review title.
    set title=123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 1234567890

    set /p asin="ASIN: "

    set /p brand="BRAND: "

    set /p item="ITEM: "
    set item=%item:.=,%
    set output=
    for %%a in (%item::=;%) do set output=!output!%%a-
    rem Eliminate the last dash:
    set output=%output:~0,-1%
    echo Output: "%output%"
    set item=%output%

    set /p description="DESCRIPTION: "
    set item=%item:.=,%
    set output=
    for %%a in (%description::=;%) do set output=!output!%%a-
    rem Eliminate the last dash:
    set output=%output:~0,-1%
    echo Output: "%output%"
    set description=%output%

    set /p bullets="BULLETS: "
    set bullets=%bullets:.=,%
    set output=
    for %%a in (%bullets::=;%) do set output=!output!%%a-
    rem Eliminate the last dash:
    set output=%output:~0,-1%
    echo Output: "%output%"
    set bullets=%output%

    set dirname="%today% %brand% %item% %asin%"
    set name="%brand% %item% %asin%"

    mkdir %dirname%\%pic%
    cd %dirname%

    echo.%title% > %name%.txt
    echo."%cd%\" >> %name%.txt
    echo.ASIN=%asin% >> %name%.txt
    echo.BRAND=%brand% >> %name%.txt
    echo.ITEM=%item% >> %name%.txt
    echo.DESCRIPTION=%description% >> %name%.txt
    echo.BULLETS=%bullets% >> %name%.txt

    REM cam/vid is for original camera images/photos (prior to processing).
    REM pic is for images AFTER processing but not named consistently yet.
    REM pic/jnk is for images/video AFTER processing & no longer needed.
    REM pic/cap is for images/video AFTER processing & after adding captions.
    REM You want cap so Irfanview batch commands have a place to put stuff.
    REM wip is for any file that is useful to the review other than those above.

    mkdir cam
    mkdir cam\vid
    mkdir pic
    mkdir .\pic\jnk
    mkdir .\pic\cap
    mkdir wip
    cd pic

    REM This is an imagemagic command to create a dummy JPEG file.
    convert -size 800x800 canvas: %name%_1a.jpg
    convert -size 800x800 canvas: %name%_2a.jpg
    convert -size 800x800 canvas: %name%_3a.jpg
    convert -size 800x800 canvas: %name%_4a.jpg
    convert -size 800x800 canvas: %name%_5a.jpg
    convert -size 800x800 canvas: %name%_6a.jpg

    cd ..\..

    set /p repeat=Do you want to make another Amazon vine-review directory?[y/n]:
    if %repeat%== y goto BEGIN
    if not %repeat%== y goto END

    END:
    exit /B 0

    I'll let folks know when/if I figure out how to get rid of the ampersand
    when it's cut-and-pasted by the user into a variable via a query.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)