English Amiga Board


Go Back   English Amiga Board > Support > support.AmigaOS

 
 
Thread Tools
Old 04 August 2022, 18:07   #1
Yulquen74
Registered User
 
Join Date: May 2013
Location: Kleppe / Norway
Posts: 253
List + lformat + names with spaces

Considering this small script which is meant to find all .info files in directories and subdirectories, and add a dummy file for the ones thats alone (like in many icon packs, and copyicon tools wont work with those icons):


echo "Adding dummy files for .info files lacking companion..."
list all files sub=.info quick nohead lformat="if not exists %p%m*necho >%p%m*nendif" >t:list
execute t:list
echo "Done!"



This sort of works, but only if the names do not contain spaces.
Doublequoting the %p%m entries inside the lformat expression does not work, so is there a working solution to this? Usage is in OS3.2 environment.
Yulquen74 is offline  
Old 04 August 2022, 18:10   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
You can escape the double quotes with * signs:

lformat="if not exists *"%p%m*"*necho >*"%p%m*"*nendif"

Nohead and quick are not needed, they are automatically assumend when lformat is used.
thomas is offline  
Old 04 August 2022, 18:40   #3
Yulquen74
Registered User
 
Join Date: May 2013
Location: Kleppe / Norway
Posts: 253
That works nicely, thanks!
Yulquen74 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spaces Invaders with a moon background Havie Coders. Blitz Basic 19 11 February 2021 13:13
AmFTP cannot retrieve files with spaces in the name DopPie support.Apps 17 22 September 2016 21:32
Matching device names with volume names. Thorham Coders. System 2 27 July 2015 12:20
Picking names at random from a list Champions_2002 Coders. General 9 05 January 2012 23:22
AmigaDOS directories with spaces in? boomtopper support.Apps 14 11 May 2007 12:57

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:06.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07564 seconds with 13 queries