Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Batch files

 
Post new topic   Reply to topic Printable version
 View previous topic  [Zone Idea] Starfox 64 styled Singlepl... Post :: Post Zone appears red to everyone, but ever...  View next topic  
Author Message
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Thu Jun 10, 2010 11:58 pm    Post subject: Batch files Reply to topic Reply with quote

so ive been working with batch files again, with large success, but theres one thing i havnt figured out yet:


i want to translate a path which could be
*/*/*/*/*/home/src/x/*/*/*.txt
i then want to move it to
*/*/*/*/*/home/bin/x/*/*/*.txt
in a batch file at
*/*/*/*/*/home
without doing chdir.
(where * = wildcard, obviously, and */*/ can be any number of dirs)

any ideas?



i also cant figure out how to tell which dir the batch file is running from, because chdir only does the working dir...
_________________
SSC Distension Owner
SSCU Trench Wars Developer


Last edited by Cheese on Fri Jun 11, 2010 12:43 am, edited 2 times in total
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Jun 11, 2010 12:23 am    Post subject: Reply to topic Reply with quote

the batch file will run from its own directory. If you use a shortcut to run it, check target folder thing property of the shortcut, it sets the initial folder.
But you can easily set the starting folder in the batch file with a cd "..."

Why the */*/*/*/ if that's the directory of your batch file?

I have this that copied all the .so files from my src/... directory to the bin/... one, if that helps:
Code: Show/Hide

@echo off

for /D %%x in (*) do if exist "%%x\Release\%%x.so" copy "%%x\Release\%%x.so" "..\..\bin\Modules\%%x\%%x.so"

if exist "..\FrontEnd\cskinviewer\Release\Discretion.exe"  copy "..\FrontEnd\cskinviewer\Release\Discretion.exe" "..\..\bin\Discretion.exe"

_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Cheese
Wow Cheese is so helpful!


Joined: Mar 18 2007
Posts: 1017
Offline

PostPosted: Fri Jun 11, 2010 12:43 am    Post subject: Reply to topic Reply with quote

wierd, the working dir is the batch files location, but not if you drop files on it for %1...
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
sirkillsalot
Novice


Joined: Jun 10 2010
Posts: 44
Offline

PostPosted: Fri Jun 11, 2010 9:53 pm    Post subject: try this Reply to topic Reply with quote

@echo off
cd path filename.txt move C:\path
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> General Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 477 page(s) served in previous 5 minutes.

phpBB Created this page in 0.503276 seconds : 29 queries executed (85.2%): GZIP compression disabled