Difference between revisions of "ISSession:FileRedirect (Command)"
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | == Operation == | ||
+ | FileRedirect works by performing a simple text replacement of the path+filename the application is attempting to open, with your provided snippet. You may replace all or part of the path. Slashes should be forward slashes ("/"), and will be normalized prior to replacement. Matching is case-insensitive. | ||
+ | |||
+ | FileRedirect is safe to use during PreStartup or Startup, but generally makes the most sense during PreStartup. | ||
+ | |||
== Syntax == | == Syntax == | ||
{{CMD-DR|FileRedirect|Advanced|Intermediate|Intermediate|Advanced}} | {{CMD-DR|FileRedirect|Advanced|Intermediate|Intermediate|Advanced}} | ||
FileRedirect <-list|-remove <original filename>|<original filename> [new filename]> | FileRedirect <-list|-remove <original filename>|<original filename> [new filename]> | ||
+ | |||
== Forms == | == Forms == | ||
*FileRedirect -list - lists all redirected files | *FileRedirect -list - lists all redirected files | ||
Line 14: | Line 20: | ||
------------------------- | ------------------------- | ||
'bob.dat' => 'tim.dat' | 'bob.dat' => 'tim.dat' | ||
+ | |||
===Redirect from one file to another=== | ===Redirect from one file to another=== | ||
*FileRedirect User.Dat User-John.dat | *FileRedirect User.Dat User-John.dat | ||
;Output | ;Output | ||
File 'User.Dat' redirected to 'User-John.dat' | File 'User.Dat' redirected to 'User-John.dat' | ||
+ | |||
+ | ===Redirect all directory access === | ||
+ | Assuming the application is opening files under C:/users/username/AppData/Local/PRODUCER\GAME/d_program files_producer_game/, and we want to append some value to this | ||
+ | *FileRedirect "AppData/Local/PRODUCER/GAME/d_program files_producer_game/" "AppData/Local/PRODUCER/GAME/d_program files_producer_game_${CharName}" | ||
+ | ;Output (assuming ${CharName} is "foo" | ||
+ | File 'AppData/Local/PRODUCER/GAME/d_program files_producer_game/' redirected to 'AppData/Local/PRODUCER/GAME/d_program files_producer_game_foo' | ||
+ | |||
+ | ===Redirect across drives === | ||
+ | Assuming the application is opening files under C:/temp/foo, '''and is accessing the file via its absolute path''', and we want to move it to a different drive | ||
+ | *FileRedirect "C:/temp/foo/" "D:/temp/foo/" | ||
+ | |||
===Remove a FileRedirect=== | ===Remove a FileRedirect=== | ||
*FileRedirect -remove User.Dat | *FileRedirect -remove User.Dat |
Latest revision as of 22:15, 7 May 2013
Contents
Operation
FileRedirect works by performing a simple text replacement of the path+filename the application is attempting to open, with your provided snippet. You may replace all or part of the path. Slashes should be forward slashes ("/"), and will be normalized prior to replacement. Matching is case-insensitive.
FileRedirect is safe to use during PreStartup or Startup, but generally makes the most sense during PreStartup.
Syntax
FileRedirect | |
Usage | Advanced |
Level of Understanding | Intermediate |
Computer Savvy | Intermediate |
Logic | Advanced |
FileRedirect <-list|-remove <original filename>|<original filename> [new filename]>
Forms
- FileRedirect -list - lists all redirected files
- FileRedirect -remove <original filename> - removes a file redirection
- FileRedirect <original filename> [new filename] - redirects from original file to new file
Examples
List redirected files
- FileRedirect -list
- Output
Inner Space redirected files ------------------------- 'bob.dat' => 'tim.dat'
Redirect from one file to another
- FileRedirect User.Dat User-John.dat
- Output
File 'User.Dat' redirected to 'User-John.dat'
Redirect all directory access
Assuming the application is opening files under C:/users/username/AppData/Local/PRODUCER\GAME/d_program files_producer_game/, and we want to append some value to this
- FileRedirect "AppData/Local/PRODUCER/GAME/d_program files_producer_game/" "AppData/Local/PRODUCER/GAME/d_program files_producer_game_${CharName}"
- Output (assuming ${CharName} is "foo"
File 'AppData/Local/PRODUCER/GAME/d_program files_producer_game/' redirected to 'AppData/Local/PRODUCER/GAME/d_program files_producer_game_foo'
Redirect across drives
Assuming the application is opening files under C:/temp/foo, and is accessing the file via its absolute path, and we want to move it to a different drive
- FileRedirect "C:/temp/foo/" "D:/temp/foo/"
Remove a FileRedirect
- FileRedirect -remove User.Dat
- Output
File 'User.Dat' redirection removed