04 August 2022, 18:07 | #1 |
Registered User
Join Date: May 2013
Location: Kleppe / Norway
Posts: 256
|
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. |
04 August 2022, 18:10 | #2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,001
|
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. |
04 August 2022, 18:40 | #3 |
Registered User
Join Date: May 2013
Location: Kleppe / Norway
Posts: 256
|
That works nicely, thanks!
|
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 |
|
|