Page 1 of 1

Access path with percent char: C:\PHOTOSHOP\CSDATA\%AppData%

Posted: 16 Jul 2007 16:51
by budhax
Hello,
Some portable softwares have sub-folders named like %AppData%
i.e. percent char in the name.

Portable Adobe Photoshop CS3 Standard (folder structure)
_ CSDATA
__ %AppData%
___ Adobe
____ Adobe Photoshop CS3
_____ Adobe Photoshop CS3 Settings
_____ - Actions Palette.psp (19.65 kilobyte)
_____ - Adobe Photoshop CS3 Prefs.psp (152.14 kilobyte)
_____ - Color Settings.csf (712.23 kilobyte)
_____ - LaunchEndFlag.psp (12 bytes)
_____ - PluginCache.psp (798.37 kilobyte)



How to access this path:
C:\Program Files\Adobe\PHOTOSHOP\CSDATA\%AppData%\Adobe\Adobe Photoshop CS3\Adobe Photoshop CS3 Settings

using commands like:

Code: Select all

dir
cd
xcopy

?

Another problem: %AppData% is a predefined variable.
echo %AppData%
outputs
C:\Documents and Settings\sam\Application Data

Thanks

mytest.bat

Code: Select all

@ECHO OFF
SET Folder=C:\Program Files\Adobe\PHOTOSHOP\CSDATA\%AppData%\Adobe\Adobe Photoshop CS3\Adobe Photoshop CS3 Settings
CD "%Folder%"
DIR "%Folder%"
Pause

Posted: 16 Jul 2007 23:09
by DosItHelp
budhax,

Try:

Code: Select all

SET "Folder=C:\Program Files\Adobe\PHOTOSHOP\CSDATA\^%AppData^%\Adobe\Adobe Photoshop CS3\Adobe Photoshop CS3 Settings"


That should do ;)

Posted: 18 Jul 2007 16:10
by budhax
Sorry,
It doesn't work. But this works fine:

Code: Select all

SET FoldPC=C:\Program Files\Adobe\PHOTOSHOP\CSDATA\%%AppData%%\Adobe\Adobe Photoshop CS3\Adobe Photoshop CS3 Settings
DIR "%FoldPC%"
CD "%FoldPC%"
DIR
Pause


So, use %% instead of single % in path using %

Thanks anyway.

Posted: 20 Jul 2007 22:11
by DosItHelp
budhax,

Strange, on the command line it's the other way around: ^% works but %% doesn't. I tried on the command line and made a bad assumption.