Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

BAT file to write to a folder that has random name

$
0
0

I am trying to create a BAT file that will write a file to a folder that is named something different within each users profile.

I would like to copy a file to the following folder...

C:\Users\%username%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\T2SHBFKV\program.kwtears.com\#hwtears\kwt\

The folder that is different for each user is: T2SHBFKV

 I found the following but could not adapt it to suite my needs and I was hoping someone could help....


for /D %%A in ("%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\*\program.kwtears.com\#hwtears\kwt\") do xcopy "\\*Internal Server*\appData.sol" "%%~A" 


When this runs I do not get an error but the file is not copied.  That said when I take the "\program.kwtears.com\#hwtears\kwt\" out I am able to write to the random folder but it just simply can't write to any of the sub folders within that random folder.

Thanks for the help!


Viewing all articles
Browse latest Browse all 15028

Latest Images

Trending Articles



Latest Images