XPost: alt.comp.os.windows-10, rec.photo.digital   
   From: ollie@invalid.net   
      
   On Sat, 16 Nov 2024 19:10:21 +0700, JJ 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 @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.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/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.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/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.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/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.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/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.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/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.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/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.c/ReadImage/746.   
   convert: unable to open image 'my': No such file or directory @    
   rror/blob.c/OpenBlob/3573.   
   convert: no decode delegate for this image format `' @ error/con   
   titute.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/con   
   titute.c/ReadImage/746.   
      
   [continued in next message]   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|