Doesn't Windows include a way of truncating things with ~ in order to maintain dos 8.3 file names?
i.e. "program files" = progra~1 So "Documents and Settings" could be Documen~1 ?? Not sure if that will help but it might. -----Original Message----- From: Don L [mailto:[EMAIL PROTECTED] Sent: Saturday, November 08, 2008 6:46 PM To: cf-talk Subject: Rember DOS? I'm having a hard time with some string manipulation with DOS for the last half an hour or so including googling to no avail. Here's the deal. DOS/Window batch process does not like white space, hence, I need to replace the following directories that including white space with quotes prefix and sufix. So, Documents and Settings would be replaced with "Documents and Settings" etc. REM %appdata% maybe = C:\Documents and Settings\aUser\Application Data\ REM Here's the problem area, I don't see anything wrong below REM however, it's not working for /f "tokens=1,2,3,4" delims=\" %%a in ("%appdata%") do set a=%%a&set b=%%b&set c=%%c&set d=%%d set a = "%a%" set b = "%b%" echo %a% REM expect to see "C:" for var a echo %b% REM expect to see "Documents and Settings" for var b Anyone? Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314992 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4