ISSession:FileRedirect (Command)

From Lavish Software Wiki
Jump to: navigation, search

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

Command Difficulty Rating
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

See Also